aboutsummaryrefslogtreecommitdiff
path: root/src/webex
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-28 15:18:01 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-28 15:18:01 +0530
commit43655adff0f8f1db082e1f0c18f1271a29ab8905 (patch)
treeaf106a1e45f85eb12399d8e25ae6f3a413d4fe60 /src/webex
parent86fd5f24406d05fe473c0ffe6c22666fe1b3e343 (diff)
updated preparePay API according to spec
Diffstat (limited to 'src/webex')
-rw-r--r--src/webex/pages/pay.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/webex/pages/pay.tsx b/src/webex/pages/pay.tsx
index a69b6b766..87f3c83d3 100644
--- a/src/webex/pages/pay.tsx
+++ b/src/webex/pages/pay.tsx
@@ -24,7 +24,7 @@
*/
import * as i18n from "../i18n";
-import { PreparePayResult } from "../../types/walletTypes";
+import { PreparePayResult, PreparePayResultType } from "../../types/walletTypes";
import { renderAmount, ProgressButton } from "../renderHtml";
import * as wxApi from "../wxApi";
@@ -58,15 +58,11 @@ function TalerPayDialog({ talerPayUri }: { talerPayUri: string }): JSX.Element {
insufficientBalance = true;
}
- if (payStatus.status === "error") {
- return <span>Error: {payStatus.error}</span>;
- }
-
if (payStatus.status === "payment-possible") {
totalFees = payStatus.totalFees;
}
- if (payStatus.status === "paid" && numTries === 0) {
+ if (payStatus.status === PreparePayResultType.AlreadyConfirmed && numTries === 0) {
return (
<span>
You have already paid for this article. Click{" "}