Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring: Asset Deviation #864

Merged
merged 6 commits into from
Aug 28, 2023
Merged

Monitoring: Asset Deviation #864

merged 6 commits into from
Aug 28, 2023

Conversation

Gauthamastro
Copy link
Member

@Gauthamastro Gauthamastro commented Aug 24, 2023

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (e0a562a) 39.55% compared to head (e0a562a) 39.55%.

❗ Current head e0a562a differs from pull request most recent head a12f3ad. Consider uploading reports for the commit a12f3ad to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           Develop     #864   +/-   ##
========================================
  Coverage    39.55%   39.55%           
========================================
  Files           48       48           
  Lines         2996     2996           
========================================
  Hits          1185     1185           
  Misses        1811     1811           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Gauthamastro Gauthamastro self-assigned this Aug 28, 2023
@Gauthamastro Gauthamastro added the A0-PleaseReview Pull request needs code review. label Aug 28, 2023
pallets/ocex/src/rpc.rs Outdated Show resolved Hide resolved
@Gauthamastro Gauthamastro added A0-PleaseReview Pull request needs code review. and removed A0-PleaseReview Pull request needs code review. labels Aug 28, 2023
@Gauthamastro Gauthamastro added A0-PleaseReview Pull request needs code review. and removed A0-PleaseReview Pull request needs code review. labels Aug 28, 2023
@Gauthamastro Gauthamastro merged commit 9c37a3c into Develop Aug 28, 2023
2 of 3 checks passed
@Gauthamastro Gauthamastro deleted the gj/rpc branch August 28, 2023 11:41
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module lacks documentation and license

pub fn release_offchain_lock() {
// Check if another worker is already running or not
let s_info = StorageValueRef::persistent(&WORKER_STATUS);
s_info.set(&false); // Set WORKER_STATUS to true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment says set to true and s_info.set(&false) set's false?

Comment on lines +53 to +56
pub fn get_balances(
state: &mut OffchainState,
account: &AccountId,
) -> Result<BTreeMap<AssetId, Decimal>, &'static str> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add docs

for (main, _) in <Accounts<T>>::iter() {
// 3. Compute sum of all balances of all assets
let balances: BTreeMap<AssetId, Decimal> =
Self::get_balances(&mut state, &Decode::decode(&mut &main.encode()[..]).unwrap())?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't unwrap be replaced with proper result handling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-PleaseReview Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants