Skip to content

Commit

Permalink
Fixes masp amounts conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Jun 16, 2024
1 parent ed74656 commit 6026c42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/core/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ impl Amount {
val: i128,
denom: MaspDigitPos,
) -> Option<Self> {
let lo = u64::try_from(val).ok()?;
#[allow(clippy::cast_sign_loss)]
#[allow(clippy::cast_possible_truncation)]
let lo = val as u64;
#[allow(clippy::cast_sign_loss)]
let hi = (val >> 64) as u64;
let lo_pos = denom as usize;
Expand Down

0 comments on commit 6026c42

Please sign in to comment.