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 c703bb1f4ff3..580737c62feb 100644 --- a/apps/ledger-live-mobile/e2e/specs/delegate/cosmos.spec.ts +++ b/apps/ledger-live-mobile/e2e/specs/delegate/cosmos.spec.ts @@ -8,6 +8,7 @@ import { } from "../../models/currencies"; import { Application } from "../../page"; import DeviceAction from "../../models/DeviceAction"; +import BigNumber from "bignumber.js"; let app: Application; let deviceAction: DeviceAction; @@ -36,8 +37,15 @@ describe("Cosmos delegate flow", () => { const delegatedPercent = 50; const unit = getAccountUnit(testAccount); + const multiplier = new BigNumber(10).pow(unit.magnitude); const usableAmount = testAccount.spendableBalance.minus(COSMOS_MIN_SAFE).minus(COSMOS_MIN_FEES); - const delegatedAmount = usableAmount.multipliedBy(delegatedPercent).div(100).integerValue(); + // const delegatedAmount = usableAmount.multipliedBy(delegatedPercent).div(100).integerValue(); + const delegatedAmount = usableAmount + .multipliedBy(multiplier) + .multipliedBy(delegatedPercent) + .div(100) + .div(multiplier) + .integerValue(); const remainingAmount = usableAmount.minus(delegatedAmount); await app.stake.selectCurrency(testedCurrency);