diff --git a/packages/taler-wallet-webextension/src/pages/pay.tsx b/packages/taler-wallet-webextension/src/pages/pay.tsx
index 1e1f91caf..f1ba2c2b3 100644
--- a/packages/taler-wallet-webextension/src/pages/pay.tsx
+++ b/packages/taler-wallet-webextension/src/pages/pay.tsx
@@ -24,13 +24,20 @@
*/
import * as i18n from "../i18n";
-
import { renderAmount, ProgressButton } from "../renderHtml";
import * as wxApi from "../wxApi";
import React, { useState, useEffect } from "react";
-import { Amounts, AmountJson, PreparePayResult, PreparePayResultType, ContractTerms, codecForContractTerms, ConfirmPayResultType } from "taler-wallet-core";
+import {
+ Amounts,
+ AmountJson,
+ PreparePayResult,
+ PreparePayResultType,
+ ContractTerms,
+ codecForContractTerms,
+ ConfirmPayResultType,
+} from "taler-wallet-core";
function TalerPayDialog({ talerPayUri }: { talerPayUri: string }): JSX.Element {
const [payStatus, setPayStatus] = useState();
@@ -60,7 +67,10 @@ function TalerPayDialog({ talerPayUri }: { talerPayUri: string }): JSX.Element {
amountEffective = Amounts.parseOrThrow(payStatus.amountEffective);
}
- if (payStatus.status === PreparePayResultType.AlreadyConfirmed && numTries === 0) {
+ if (
+ payStatus.status === PreparePayResultType.AlreadyConfirmed &&
+ numTries === 0
+ ) {
return (
You have already paid for this article. Click{" "}
diff --git a/packages/taler-wallet-webextension/src/pages/withdraw.tsx b/packages/taler-wallet-webextension/src/pages/withdraw.tsx
index 1637176a9..2747dd3f7 100644
--- a/packages/taler-wallet-webextension/src/pages/withdraw.tsx
+++ b/packages/taler-wallet-webextension/src/pages/withdraw.tsx
@@ -43,7 +43,6 @@ function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element {
const talerWithdrawUri = props.talerWithdrawUri;
const [cancelled, setCancelled] = useState(false);
const [selecting, setSelecting] = useState(false);
- const [customUrl, setCustomUrl] = useState("");
const [errMsg, setErrMsg] = useState("");
const [updateCounter, setUpdateCounter] = useState(1);
@@ -58,6 +57,9 @@ function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element {
const fetchData = async (): Promise => {
const res = await getWithdrawalDetailsForUri({talerWithdrawUri: props.talerWithdrawUri});
setDetails(res);
+ if (res.defaultExchangeBaseUrl) {
+ setSelectedExchange(res.defaultExchangeBaseUrl);
+ }
};
fetchData();
}, [selectedExchange, errMsg, selecting, talerWithdrawUri, updateCounter]);
@@ -124,10 +126,6 @@ function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element {
{i18n.str`Cancel withdraw operation`}
-
- {/* {details.exchangeWithdrawDetails ? (
-
- ) : null} */}
);
diff --git a/packages/taler-wallet-webextension/src/wxApi.ts b/packages/taler-wallet-webextension/src/wxApi.ts
index 836466ff3..dc78686ad 100644
--- a/packages/taler-wallet-webextension/src/wxApi.ts
+++ b/packages/taler-wallet-webextension/src/wxApi.ts
@@ -98,7 +98,7 @@ export function confirmPay(
proposalId: string,
sessionId: string | undefined,
): Promise {
- return callBackend("confirm-pay", { proposalId, sessionId });
+ return callBackend("confirmPay", { proposalId, sessionId });
}
/**
@@ -184,7 +184,7 @@ export function benchmarkCrypto(repetitions: number): Promise {
* Get details about a pay operation.
*/
export function preparePay(talerPayUri: string): Promise {
- return callBackend("prepare-pay", { talerPayUri });
+ return callBackend("preparePay", { talerPayUri });
}
/**
@@ -194,9 +194,9 @@ export function acceptWithdrawal(
talerWithdrawUri: string,
selectedExchange: string,
): Promise {
- return callBackend("accept-withdrawal", {
+ return callBackend("acceptBankIntegratedWithdrawal", {
talerWithdrawUri,
- selectedExchange,
+ exchangeBaseUrl: selectedExchange,
});
}