-
Notifications
You must be signed in to change notification settings - Fork 93
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
Conversation
Codecov ReportPatch and project coverage have no change.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
pub fn get_balances( | ||
state: &mut OffchainState, | ||
account: &AccountId, | ||
) -> Result<BTreeMap<AssetId, Decimal>, &'static str> { |
There was a problem hiding this comment.
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())?; |
There was a problem hiding this comment.
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?
Closes https://github.com/Polkadex-Substrate/issue-tracker/issues/240