diff options
author | Sebastian <sebasjm@gmail.com> | 2023-11-21 17:10:07 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-11-21 17:10:31 -0300 |
commit | 32182fb1b912e1136ba933c4a4f204e6e2f33de2 (patch) | |
tree | 9de9caf82632994c233fbbd4366b086818217c7d /packages/taler-wallet-webextension/src/wallet/AddExchange/state.ts | |
parent | 6000a55d583832a71335310514688f1f6faed722 (diff) | |
download | wallet-core-32182fb1b912e1136ba933c4a4f204e6e2f33de2.tar.xz |
cashout creation
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/AddExchange/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/AddExchange/state.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/AddExchange/state.ts b/packages/taler-wallet-webextension/src/wallet/AddExchange/state.ts index fc1762331..61f4308f4 100644 --- a/packages/taler-wallet-webextension/src/wallet/AddExchange/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/AddExchange/state.ts @@ -16,7 +16,7 @@ import { useState, useEffect, useCallback } from "preact/hooks"; import { Props, State } from "./index.js"; -import { ExchangeEntryStatus, TalerConfigResponse, TranslatedString, canonicalizeBaseUrl } from "@gnu-taler/taler-util"; +import { ExchangeEntryStatus, TalerCorebankApi, TalerExchangeApi, canonicalizeBaseUrl } from "@gnu-taler/taler-util"; import { useBackendContext } from "../../context/backend.js"; import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; @@ -27,7 +27,7 @@ import { withSafe } from "../../mui/handlers.js"; export function useComponentState({ onBack, currency, noDebounce }: Props): RecursiveState<State> { const [verified, setVerified] = useState< - { url: string; config: TalerConfigResponse } | undefined + { url: string; config: { currency_specification: {currency: string}, version: string} } | undefined >(undefined); const api = useBackendContext(); @@ -48,10 +48,10 @@ export function useComponentState({ onBack, currency, noDebounce }: Props): Recu if (found !== -1) { throw Error("This exchange is already active") } - const result = await request<TalerConfigResponse>(c, "/keys") + const result = await request<{ currency_specification: {currency: string}, version: string}>(c, "/keys") return result }, [used]) - const { result, value: url, update, error: requestError } = useDebounce<HttpResponse<TalerConfigResponse, unknown>>(ccc, noDebounce ?? false) + const { result, value: url, update, error: requestError } = useDebounce<HttpResponse<{ currency_specification: {currency: string}, version: string}, unknown>>(ccc, noDebounce ?? false) const [inputError, setInputError] = useState<string>() return { |