diff options
author | Sebastian <sebasjm@gmail.com> | 2022-12-06 11:28:56 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-12-06 11:28:56 -0300 |
commit | 51bbf08d241f0eff8847f6656accee03c0626d88 (patch) | |
tree | 61cc838fff22c5ceb39ef47105923a755ccdd32e /packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts | |
parent | de9f10cbf0c694d004149a7d8f4b9a458b5b0a71 (diff) | |
download | wallet-core-51bbf08d241f0eff8847f6656accee03c0626d88.tar.xz |
implement web-utils in web-extension
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts index fe02151de..a67f926bc 100644 --- a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts @@ -21,7 +21,6 @@ import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js"; import { assertUnreachable, RecursiveState } from "../../utils/index.js"; import { wxApi } from "../../wxApi.js"; import { Contact, Props, State } from "./index.js"; -import bankIcon from "../../svg/ri-bank-line.svg"; export function useComponentState( props: Props, @@ -42,22 +41,22 @@ export function useComponentState( const previous: Contact[] = true ? [] : [ - { - name: "International Bank", - icon: bankIcon, //FIXME: should be decided in the view - description: "account ending with 3454", - }, - { - name: "Max", - icon: bankIcon, - description: "account ending with 3454", - }, - { - name: "Alex", - icon: bankIcon, - description: "account ending with 3454", - }, - ]; + { + name: "International Bank", + icon_type: 'bank', + description: "account ending with 3454", + }, + { + name: "Max", + icon_type: 'bank', + description: "account ending with 3454", + }, + { + name: "Alex", + icon_type: 'bank', + description: "account ending with 3454", + }, + ]; if (!amount) { return () => { @@ -115,15 +114,15 @@ export function useComponentState( onClick: invalid ? undefined : async () => { - props.goToWalletBankDeposit(currencyAndAmount); - }, + props.goToWalletBankDeposit(currencyAndAmount); + }, }, goToWallet: { onClick: invalid ? undefined : async () => { - props.goToWalletWalletSend(currencyAndAmount); - }, + props.goToWalletWalletSend(currencyAndAmount); + }, }, amountHandler: { onInput: async (s) => setAmount(s), @@ -145,15 +144,15 @@ export function useComponentState( onClick: invalid ? undefined : async () => { - props.goToWalletManualWithdraw(currencyAndAmount); - }, + props.goToWalletManualWithdraw(currencyAndAmount); + }, }, goToWallet: { onClick: invalid ? undefined : async () => { - props.goToWalletWalletInvoice(currencyAndAmount); - }, + props.goToWalletWalletInvoice(currencyAndAmount); + }, }, amountHandler: { onInput: async (s) => setAmount(s), |