Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
leecchh committed Nov 19, 2024
1 parent d7be601 commit 6f71400
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/payments/tests/payments_tests.move
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ fun test_math() {
let exponent_with_buffer =
buffer + target_decimals + pyth_decimals - base_decimals;
let target_currency_amount =
(base_currency_amount as u128 * 10u128.pow(exponent_with_buffer as u8))
(base_currency_amount as u128 * 10u128.pow(exponent_with_buffer))
.divide_and_round_up(pyth_price as u128)
.divide_and_round_up(10u128.pow(buffer as u8)) as u64;
.divide_and_round_up(10u128.pow(buffer)) as u64;

assert!(target_currency_amount == 26315789474, 1); // 26.315789474 SUI
}
Expand All @@ -31,9 +31,9 @@ fun test_math_2() {
let exponent_with_buffer =
buffer + target_decimals + pyth_decimals - base_decimals;
let target_currency_amount =
(base_currency_amount as u128 * 10u128.pow(exponent_with_buffer as u8))
(base_currency_amount as u128 * 10u128.pow(exponent_with_buffer))
.divide_and_round_up(pyth_price as u128)
.divide_and_round_up(10u128.pow(buffer as u8)) as u64;
.divide_and_round_up(10u128.pow(buffer)) as u64;

assert!(target_currency_amount == 27, 1); // 27 TOKEN
}

0 comments on commit 6f71400

Please sign in to comment.