diff --git a/platform/packages/finance/src/percent/mod.rs b/platform/packages/finance/src/percent/mod.rs index bb6da70a3..eee303ab2 100644 --- a/platform/packages/finance/src/percent/mod.rs +++ b/platform/packages/finance/src/percent/mod.rs @@ -225,9 +225,7 @@ pub(super) mod test { fn test_zero() { assert_eq!( Coin::::new(0), - Percent::ZERO - .of(Coin::::new(10)) - .expect("Expected zero percent") + Percent::ZERO.of(Coin::::new(10)).unwrap() ) } @@ -238,10 +236,7 @@ pub(super) mod test { Coin::::new(amount), Percent::HUNDRED .of(Coin::::new(amount)) - .expect(&format!( - "Failed to calculate 100% of the coin amount: {}", - amount - )) + .unwrap() ) } diff --git a/tests/src/lpp_tests.rs b/tests/src/lpp_tests.rs index 0c3d19c2d..4f2b2b2cc 100644 --- a/tests/src/lpp_tests.rs +++ b/tests/src/lpp_tests.rs @@ -855,12 +855,7 @@ fn loan_open_and_repay() { let balance = bank::balance::<_, Lpns>(&loan_addr1, test_case.app.query()).unwrap(); assert_eq!( balance, - Coin::::from( - loan1 - - interest1 - .of(loan1) - .expect("Failed to calculate interest on the loan") - ) + Coin::::from(loan1 - interest1.of(loan1).unwrap()) ); let resp: LppBalanceResponse = test_case @@ -1240,12 +1235,7 @@ fn compare_lpp_states() { let balance = bank::balance::<_, Lpns>(&loan_addr1, test_case.app.query()).unwrap(); assert_eq!( balance, - Coin::::from( - loan1 - - interest1 - .of(loan1) - .expect("Failed to calculate interest on the loan") - ) + Coin::::from(loan1 - interest1.of(loan1).unwrap()) ); let resp: LppBalanceResponse = test_case