From 09b5a61ae5532e8776a4dfc96e7ce88ddb32eec6 Mon Sep 17 00:00:00 2001 From: Samy RABAH-MONTAROU Date: Thu, 5 Sep 2024 11:23:31 +0200 Subject: [PATCH] round up --- apps/ledger-live-mobile/e2e/specs/delegate/cosmos.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ledger-live-mobile/e2e/specs/delegate/cosmos.spec.ts b/apps/ledger-live-mobile/e2e/specs/delegate/cosmos.spec.ts index 73d861750829..9cbd8ed1d96b 100644 --- a/apps/ledger-live-mobile/e2e/specs/delegate/cosmos.spec.ts +++ b/apps/ledger-live-mobile/e2e/specs/delegate/cosmos.spec.ts @@ -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);