summaryrefslogtreecommitdiff
path: root/src/webex/pages/withdraw.tsx
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-28 14:22:35 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-28 14:22:35 +0530
commit4365cd6401713b2e207d8c032c0558487e860154 (patch)
treef66b4bc5aa9dd7e92b72546e0b2fe79c18ed6573 /src/webex/pages/withdraw.tsx
parent472307a607b046e32f50b05a8be44c47c4b153d4 (diff)
downloadwallet-core-4365cd6401713b2e207d8c032c0558487e860154.tar.gz
wallet-core-4365cd6401713b2e207d8c032c0558487e860154.tar.bz2
wallet-core-4365cd6401713b2e207d8c032c0558487e860154.zip
towards the new withdrawal API (temporarily breaks WebExtension wallet)
Diffstat (limited to 'src/webex/pages/withdraw.tsx')
-rw-r--r--src/webex/pages/withdraw.tsx42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/webex/pages/withdraw.tsx b/src/webex/pages/withdraw.tsx
index 0216cdb4f..4a92704b3 100644
--- a/src/webex/pages/withdraw.tsx
+++ b/src/webex/pages/withdraw.tsx
@@ -23,20 +23,17 @@
import * as i18n from "../i18n";
-import { WithdrawalDetailsResponse } from "../../types/walletTypes";
-
import { WithdrawDetailView, renderAmount } from "../renderHtml";
import React, { useState, useEffect } from "react";
import {
- getWithdrawDetails,
acceptWithdrawal,
onUpdateNotification,
} from "../wxApi";
function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element {
const [details, setDetails] = useState<
- WithdrawalDetailsResponse | undefined
+ any | undefined
>();
const [selectedExchange, setSelectedExchange] = useState<
string | undefined
@@ -57,24 +54,25 @@ function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element {
useEffect(() => {
const fetchData = async (): Promise<void> => {
- console.log("getting from", talerWithdrawUri);
- let d: WithdrawalDetailsResponse | undefined = undefined;
- try {
- d = await getWithdrawDetails(talerWithdrawUri, selectedExchange);
- } catch (e) {
- console.error(
- `error getting withdraw details for uri ${talerWithdrawUri}, exchange ${selectedExchange}`,
- e,
- );
- setErrMsg(e.message);
- return;
- }
- console.log("got withdrawDetails", d);
- if (!selectedExchange && d.bankWithdrawDetails.suggestedExchange) {
- console.log("setting selected exchange");
- setSelectedExchange(d.bankWithdrawDetails.suggestedExchange);
- }
- setDetails(d);
+ // FIXME: re-implement with new API
+ // console.log("getting from", talerWithdrawUri);
+ // let d: WithdrawalDetailsResponse | undefined = undefined;
+ // try {
+ // d = await getWithdrawDetails(talerWithdrawUri, selectedExchange);
+ // } catch (e) {
+ // console.error(
+ // `error getting withdraw details for uri ${talerWithdrawUri}, exchange ${selectedExchange}`,
+ // e,
+ // );
+ // setErrMsg(e.message);
+ // return;
+ // }
+ // console.log("got withdrawDetails", d);
+ // if (!selectedExchange && d.bankWithdrawDetails.suggestedExchange) {
+ // console.log("setting selected exchange");
+ // setSelectedExchange(d.bankWithdrawDetails.suggestedExchange);
+ // }
+ // setDetails(d);
};
fetchData();
}, [selectedExchange, errMsg, selecting, talerWithdrawUri, updateCounter]);