Skip to content

Commit

Permalink
Update pallets/ocex/src/settlement.rs
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
Gauthamastro and coderabbitai[bot] authored Mar 7, 2024
1 parent c5cae1e commit a1a80e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pallets/ocex/src/settlement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn get_balance(
let balances: BTreeMap<AssetId, Decimal> = match state.get(&account.to_raw_vec())? {
None => BTreeMap::new(),
Some(encoded) => BTreeMap::decode(&mut &encoded[..])
.map_err(|_| "Unable to decode balances for account")?,
.map_err(|e| { log::error!("Failed to decode balances for account {:?}: {:?}", account, e); "Unable to decode balances for account" })?,
};

Ok(balances.get(&asset).copied().unwrap_or_default())
Expand Down

0 comments on commit a1a80e5

Please sign in to comment.