From c265e7d019d445add2d2cfb7cfcbdeee059684d3 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian@dold.me>
Date: Tue, 29 Mar 2022 13:47:32 +0200
Subject: wallet: make retries more robust and consistent

---
 packages/taler-wallet-webextension/src/wallet/DepositPage.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/wallet/DepositPage.tsx')

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);
-- 
cgit v1.2.3

