summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/TransferCreate
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-12-15 17:12:03 -0300
committerSebastian <sebasjm@gmail.com>2022-12-15 17:12:03 -0300
commitf1f8f818dbe631fbeeba64af9dfcae1aa7842615 (patch)
tree856d3b443556ce271c3e9fdab6aed7ae7728ab65 /packages/taler-wallet-webextension/src/cta/TransferCreate
parentf93bd51499ed34844b666bf6d333227adf4368bf (diff)
downloadwallet-core-f1f8f818dbe631fbeeba64af9dfcae1aa7842615.tar.gz
wallet-core-f1f8f818dbe631fbeeba64af9dfcae1aa7842615.tar.bz2
wallet-core-f1f8f818dbe631fbeeba64af9dfcae1aa7842615.zip
pretty
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/TransferCreate')
-rw-r--r--packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts16
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts b/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts
index 3536014da..c09a524c8 100644
--- a/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/TransferCreate/state.ts
@@ -17,7 +17,7 @@
import {
Amounts,
TalerErrorDetail,
- TalerProtocolTimestamp
+ TalerProtocolTimestamp,
} from "@gnu-taler/taler-util";
import { TalerError, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { isFuture, parse } from "date-fns";
@@ -26,10 +26,12 @@ import { useBackendContext } from "../../context/backend.js";
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
import { Props, State } from "./index.js";
-export function useComponentState(
- { amount: amountStr, onClose, onSuccess }: Props,
-): State {
- const api = useBackendContext()
+export function useComponentState({
+ amount: amountStr,
+ onClose,
+ onSuccess,
+}: Props): State {
+ const api = useBackendContext();
const amount = Amounts.parseOrThrow(amountStr);
const [subject, setSubject] = useState<string | undefined>();
@@ -124,8 +126,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),
},