From dc002f99a96752d3f0a10efe44a8a4d0503e8529 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 22 Dec 2022 18:42:18 -0300 Subject: support for ext+taler:// while taler:// is not yet allowed as scheme --- packages/taler-wallet-webextension/src/cta/Withdraw/state.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'packages/taler-wallet-webextension/src/cta') diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts index 1ecf05eca..d1853442b 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts @@ -90,7 +90,7 @@ export function useComponentStateFromParams({ } export function useComponentStateFromURI({ - talerWithdrawUri, + talerWithdrawUri: maybeTalerUri, cancel, onSuccess, }: PropsFromURI): RecursiveState { @@ -99,7 +99,10 @@ export function useComponentStateFromURI({ * Ask the wallet about the withdraw URI */ const uriInfoHook = useAsyncAsHook(async () => { - if (!talerWithdrawUri) throw Error("ERROR_NO-URI-FOR-WITHDRAWAL"); + if (!maybeTalerUri) throw Error("ERROR_NO-URI-FOR-WITHDRAWAL"); + const talerWithdrawUri = maybeTalerUri.startsWith("ext+") + ? maybeTalerUri.substring(4) + : maybeTalerUri; const uriInfo = await api.wallet.call( WalletApiOperation.GetWithdrawalDetailsForUri, -- cgit v1.2.3