diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-08-19 19:39:21 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-08-19 19:39:21 +0530 |
commit | f7299a1aa0952490629588aa5a853999684b3fb9 (patch) | |
tree | 9027302ca185328f3cd17ae879390e27a4f521b7 /packages/taler-wallet-webextension/src/pages/pay.tsx | |
parent | 0f390477f3b4022d8434668ea9aee014ff9f7ec0 (diff) | |
download | wallet-core-f7299a1aa0952490629588aa5a853999684b3fb9.tar.xz |
make basic withdrawal and payment work again with new API
Diffstat (limited to 'packages/taler-wallet-webextension/src/pages/pay.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/pages/pay.tsx | 16 |
1 files changed, 13 insertions, 3 deletions
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<PreparePayResult | undefined>(); @@ -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 ( <span> You have already paid for this article. Click{" "} |