diff options
author | Sebastian <sebasjm@gmail.com> | 2022-09-16 16:04:41 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-09-16 16:04:41 -0300 |
commit | e14310825437c5de93c07c570639d2a09fc4826b (patch) | |
tree | 6d63ed9d62bdb21fdbf41e8c5d30fcc08bb9326f /packages/taler-wallet-webextension/src/cta/Deposit | |
parent | 59d235e8d29159bc8caccf8bee6a2bca8b0b90dc (diff) | |
download | wallet-core-e14310825437c5de93c07c570639d2a09fc4826b.tar.xz |
pretty
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Deposit')
3 files changed, 11 insertions, 11 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Deposit/index.ts b/packages/taler-wallet-webextension/src/cta/Deposit/index.ts index d6433b18c..0246b6f7c 100644 --- a/packages/taler-wallet-webextension/src/cta/Deposit/index.ts +++ b/packages/taler-wallet-webextension/src/cta/Deposit/index.ts @@ -30,10 +30,7 @@ export interface Props { onSuccess: (tx: string) => Promise<void>; } -export type State = - | State.Loading - | State.LoadingUriError - | State.Ready; +export type State = State.Loading | State.LoadingUriError | State.Ready; export namespace State { export interface Loading { diff --git a/packages/taler-wallet-webextension/src/cta/Deposit/state.ts b/packages/taler-wallet-webextension/src/cta/Deposit/state.ts index b6861cb4b..5662a24c8 100644 --- a/packages/taler-wallet-webextension/src/cta/Deposit/state.ts +++ b/packages/taler-wallet-webextension/src/cta/Deposit/state.ts @@ -24,7 +24,6 @@ export function useComponentState( { talerDepositUri, amountStr, cancel, onSuccess }: Props, api: typeof wxApi, ): State { - const info = useAsyncAsHook(async () => { if (!talerDepositUri) throw Error("ERROR_NO-URI-FOR-DEPOSIT"); if (!amountStr) throw Error("ERROR_NO-AMOUNT-FOR-DEPOSIT"); diff --git a/packages/taler-wallet-webextension/src/cta/Deposit/test.ts b/packages/taler-wallet-webextension/src/cta/Deposit/test.ts index 5d5c5cecb..b6e63a796 100644 --- a/packages/taler-wallet-webextension/src/cta/Deposit/test.ts +++ b/packages/taler-wallet-webextension/src/cta/Deposit/test.ts @@ -35,7 +35,9 @@ describe("Deposit CTA states", () => { cancel: async () => { null; }, - onSuccess: async () => { null; }, + onSuccess: async () => { + null; + }, }, { prepareRefund: async () => ({}), @@ -76,14 +78,16 @@ describe("Deposit CTA states", () => { cancel: async () => { null; }, - onSuccess: async () => { null; }, + onSuccess: async () => { + null; + }, }, { prepareDeposit: async () => - ({ - effectiveDepositAmount: Amounts.parseOrThrow("EUR:1"), - totalDepositCost: Amounts.parseOrThrow("EUR:1.2"), - } as PrepareDepositResponse as any), + ({ + effectiveDepositAmount: Amounts.parseOrThrow("EUR:1"), + totalDepositCost: Amounts.parseOrThrow("EUR:1.2"), + } as PrepareDepositResponse as any), createDepositGroup: async () => ({}), } as any, ), |