Skip to content

Commit

Permalink
round up
Browse files Browse the repository at this point in the history
  • Loading branch information
Wozacosta committed Sep 5, 2024
1 parent d9876c4 commit 09b5a61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/ledger-live-mobile/e2e/specs/delegate/cosmos.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ describe("Cosmos delegate flow", () => {
const unit = getAccountUnit(testAccount);

const usableAmount = testAccount.spendableBalance.minus(COSMOS_MIN_SAFE).minus(COSMOS_MIN_FEES);
// Banker's rounding to avoid floating point errors
// rounding to avoid floating point errors
// NOTE: we could allow for some precision error here to avoid rounding issues
const delegatedAmount = usableAmount
.multipliedBy(delegatedPercent)
.div(100)
.integerValue(BigNumber.ROUND_HALF_UP);
.integerValue(BigNumber.ROUND_CEIL);
const remainingAmount = usableAmount.minus(delegatedAmount);

await app.stake.selectCurrency(testedCurrency);
Expand Down

0 comments on commit 09b5a61

Please sign in to comment.