diff options
author | Florian Dold <florian@dold.me> | 2022-03-29 13:47:32 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-29 13:48:51 +0200 |
commit | c265e7d019d445add2d2cfb7cfcbdeee059684d3 (patch) | |
tree | 6904e9cdb723992728ed511103be65094ca50034 /packages/taler-wallet-webextension/src/wallet/DepositPage.tsx | |
parent | be489b6b3ea4214f546dfc33d6bb0f39ce82b5ab (diff) | |
download | wallet-core-c265e7d019d445add2d2cfb7cfcbdeee059684d3.tar.xz |
wallet: make retries more robust and consistent
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DepositPage.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DepositPage.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx index 3874b65f5..1ad8b07f5 100644 --- a/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx +++ b/packages/taler-wallet-webextension/src/wallet/DepositPage.tsx @@ -21,7 +21,7 @@ import { Balance, PaytoUri, } from "@gnu-taler/taler-util"; -import { DepositFee } from "@gnu-taler/taler-wallet-core/src/operations/deposits"; +import { DepositGroupFees } from "@gnu-taler/taler-wallet-core/src/operations/deposits"; import { Fragment, h, VNode } from "preact"; import { useEffect, useState } from "preact/hooks"; import { Loading } from "../components/Loading.js"; @@ -68,7 +68,7 @@ export function DepositPage({ currency, onCancel, onSuccess }: Props): VNode { async function getFeeForAmount( p: PaytoUri, a: AmountJson, - ): Promise<DepositFee> { + ): Promise<DepositGroupFees> { const account = `payto://${p.targetType}/${p.targetPath}`; const amount = Amounts.stringify(a); return await wxApi.getFeeForDeposit(account, amount); @@ -106,7 +106,7 @@ interface ViewProps { onCalculateFee: ( account: PaytoUri, amount: AmountJson, - ) => Promise<DepositFee>; + ) => Promise<DepositGroupFees>; } type State = NoBalanceState | NoAccountsState | DepositState; @@ -135,12 +135,12 @@ export function useComponentState( onCalculateFee: ( account: PaytoUri, amount: AmountJson, - ) => Promise<DepositFee>, + ) => Promise<DepositGroupFees>, ): State { const accountMap = createLabelsForBankAccount(accounts); const [accountIdx, setAccountIdx] = useState(0); const [amount, setAmount] = useState<number | undefined>(undefined); - const [fee, setFee] = useState<DepositFee | undefined>(undefined); + const [fee, setFee] = useState<DepositGroupFees | undefined>(undefined); function updateAmount(num: number | undefined) { setAmount(num); setFee(undefined); |