Skip to content

Commit

Permalink
chore: fix CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
maneva3 committed Aug 19, 2024
1 parent a68e5af commit b384923
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
9 changes: 2 additions & 7 deletions platform/packages/finance/src/percent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,7 @@ pub(super) mod test {
fn test_zero() {
assert_eq!(
Coin::<SubGroupTestC10>::new(0),
Percent::ZERO
.of(Coin::<SubGroupTestC10>::new(10))
.expect("Expected zero percent")
Percent::ZERO.of(Coin::<SubGroupTestC10>::new(10)).unwrap()
)
}

Expand All @@ -238,10 +236,7 @@ pub(super) mod test {
Coin::<SubGroupTestC10>::new(amount),
Percent::HUNDRED
.of(Coin::<SubGroupTestC10>::new(amount))
.expect(&format!(
"Failed to calculate 100% of the coin amount: {}",
amount
))
.unwrap()
)
}

Expand Down
14 changes: 2 additions & 12 deletions tests/src/lpp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Lpn>::from(
loan1
- interest1
.of(loan1)
.expect("Failed to calculate interest on the loan")
)
Coin::<Lpn>::from(loan1 - interest1.of(loan1).unwrap())
);

let resp: LppBalanceResponse<Lpns> = test_case
Expand Down Expand Up @@ -1240,12 +1235,7 @@ fn compare_lpp_states() {
let balance = bank::balance::<_, Lpns>(&loan_addr1, test_case.app.query()).unwrap();
assert_eq!(
balance,
Coin::<Lpn>::from(
loan1
- interest1
.of(loan1)
.expect("Failed to calculate interest on the loan")
)
Coin::<Lpn>::from(loan1 - interest1.of(loan1).unwrap())
);

let resp: LppBalanceResponse<Lpns> = test_case
Expand Down

0 comments on commit b384923

Please sign in to comment.