diff options
author | Sebastian <sebasjm@gmail.com> | 2022-12-15 17:12:03 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-12-15 17:12:03 -0300 |
commit | f1f8f818dbe631fbeeba64af9dfcae1aa7842615 (patch) | |
tree | 856d3b443556ce271c3e9fdab6aed7ae7728ab65 /packages/taler-wallet-webextension/src/cta/InvoiceCreate | |
parent | f93bd51499ed34844b666bf6d333227adf4368bf (diff) | |
download | wallet-core-f1f8f818dbe631fbeeba64af9dfcae1aa7842615.tar.xz |
pretty
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/InvoiceCreate')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts index a26167f8e..998270e53 100644 --- a/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts +++ b/packages/taler-wallet-webextension/src/cta/InvoiceCreate/state.ts @@ -29,11 +29,13 @@ import { useSelectedExchange } from "../../hooks/useSelectedExchange.js"; import { RecursiveState } from "../../utils/index.js"; import { Props, State } from "./index.js"; -export function useComponentState( - { amount: amountStr, onClose, onSuccess }: Props, -): RecursiveState<State> { +export function useComponentState({ + amount: amountStr, + onClose, + onSuccess, +}: Props): RecursiveState<State> { const amount = Amounts.parseOrThrow(amountStr); - const api = useBackendContext() + const api = useBackendContext(); const hook = useAsyncAsHook(() => api.wallet.call(WalletApiOperation.ListExchanges, {}), @@ -158,8 +160,8 @@ export function useComponentState( subject === undefined ? undefined : !subject - ? "Can't be empty" - : undefined, + ? "Can't be empty" + : undefined, value: subject ?? "", onInput: async (e) => setSubject(e), }, |