diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts b/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts index d8bc7d980..d7c7d2b48 100644 --- a/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts @@ -40,10 +40,18 @@ export function useComponentState({ api.wallet.call(WalletApiOperation.ListKnownBankAccounts, { currency }), ); const { devMode } = useDevContext(); + const accountType: Record<string, string> = { + iban: "IBAN", + // "x-taler-bank": "Taler Bank", + }; + if (devMode) { + accountType["bitcoin"] = "Bitcoin"; + accountType["x-taler-bank"] = "Taler Bank"; + } const [payto, setPayto] = useState(""); const [alias, setAlias] = useState(""); - const [type, setType] = useState(""); + const [type, setType] = useState("iban"); if (!hook) { return { @@ -58,15 +66,6 @@ export function useComponentState({ }; } - const accountType: Record<string, string> = { - "": "Choose one account type", - iban: "IBAN", - // "x-taler-bank": "Taler Bank", - }; - if (devMode) { - accountType["bitcoin"] = "Bitcoin"; - accountType["x-taler-bank"] = "Taler Bank"; - } const uri = parsePaytoUri(payto); const found = hook.response.accounts.findIndex( |