diff options
author | Florian Dold <florian@dold.me> | 2022-11-02 17:42:14 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-11-02 18:23:17 +0100 |
commit | d50294f76e0aa357d690a933bb6d696a2f6aef1b (patch) | |
tree | abe961337c5df1614b5095bce6c5b09e761cda2c /packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts | |
parent | 6c3ef31d9a7ba44829e779afed0af9be3ab23723 (diff) | |
download | wallet-core-d50294f76e0aa357d690a933bb6d696a2f6aef1b.tar.xz |
wallet-core: DB FIXMEs (amount format)
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts b/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts index a70682d89..2693db79e 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts @@ -99,7 +99,7 @@ export function useComponentState( const balance = bs.length > 0 ? Amounts.parseOrThrow(bs[0].available) - : Amounts.getZero(currency); + : Amounts.zeroOfCurrency(currency); if (Amounts.isZero(balance)) { return { @@ -157,12 +157,12 @@ export function useComponentState( const totalFee = fee !== undefined ? Amounts.sum([fee.wire, fee.coin, fee.refresh]).amount - : Amounts.getZero(currency); + : Amounts.zeroOfCurrency(currency); const totalToDeposit = parsedAmount && fee !== undefined ? Amounts.sub(parsedAmount, totalFee).amount - : Amounts.getZero(currency); + : Amounts.zeroOfCurrency(currency); const isDirty = amount !== initialValue; const amountError = !isDirty |