diff options
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 { |