diff options
author | Sebastian <sebasjm@gmail.com> | 2024-03-04 11:52:36 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-03-04 11:52:36 -0300 |
commit | c58349ebaa173881a4201e83e928325707758eb8 (patch) | |
tree | a5cf60762675072f7f2b6edbe1d12568aebc7e74 /packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts | |
parent | 97d4a6445ad86ffad842fd763e0ac8053b971e69 (diff) | |
download | wallet-core-c58349ebaa173881a4201e83e928325707758eb8.tar.xz |
fix #8371
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts b/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts index 8c773186e..97b2ab517 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage/state.ts @@ -60,8 +60,8 @@ export function useComponentState({ parsed !== undefined ? parsed : currency !== undefined - ? Amounts.zeroOfCurrency(currency) - : undefined; + ? Amounts.zeroOfCurrency(currency) + : undefined; // const [accountIdx, setAccountIdx] = useState<number>(0); const [selectedAccount, setSelectedAccount] = useState<PaytoUri>(); @@ -83,7 +83,8 @@ export function useComponentState({ if (hook.hasError) { return { status: "error", - error: alertFromError(i18n.str`Could not load balance information`, hook), + error: alertFromError(i18n, + i18n.str`Could not load balance information`, hook), }; } const { accounts, balances } = hook.response; @@ -169,6 +170,7 @@ export function useComponentState({ return { status: "error", error: alertFromError( + i18n, i18n.str`Could not load fee for amount ${amountStr}`, hook, ), @@ -193,8 +195,8 @@ export function useComponentState({ const amountError = !isDirty ? undefined : Amounts.cmp(balance, amount) === -1 - ? `Too much, your current balance is ${Amounts.stringifyValue(balance)}` - : undefined; + ? `Too much, your current balance is ${Amounts.stringifyValue(balance)}` + : undefined; const unableToDeposit = Amounts.isZero(totalToDeposit) || //deposit may be zero because of fee |