diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw/state.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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<State> { @@ -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, |