summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-09-08 15:30:32 -0300
committerSebastian <sebasjm@gmail.com>2021-09-08 15:35:44 -0300
commit217f34397f95fc988280eee9c376efe0781c69ea (patch)
tree8cfb4011a7ddcb7409b7617ec8ac1425d08b1512 /packages/taler-wallet-core
parenta72ec5971e7c65e13a22627fc52983b75d4bea71 (diff)
downloadwallet-core-217f34397f95fc988280eee9c376efe0781c69ea.tar.gz
wallet-core-217f34397f95fc988280eee9c376efe0781c69ea.tar.bz2
wallet-core-217f34397f95fc988280eee9c376efe0781c69ea.zip
first approach to new design for withdraw
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts2
-rw-r--r--packages/taler-wallet-core/src/wallet.ts5
2 files changed, 6 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index e6b6e874..620ad88b 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -92,7 +92,7 @@ interface DenominationSelectionInfo {
*
* Sent to the wallet frontend to be rendered and shown to the user.
*/
-interface ExchangeWithdrawDetails {
+export interface ExchangeWithdrawDetails {
/**
* Exchange that the reserve will be created at.
*/
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index fec7e615..cbaf03c3 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -28,6 +28,7 @@ import {
codecForDeleteTransactionRequest,
codecForRetryTransactionRequest,
codecForSetWalletDeviceIdRequest,
+ codecForGetExchangeWithdrawalInfo,
durationFromSpec,
durationMin,
getDurationRemaining,
@@ -693,6 +694,10 @@ async function dispatchRequestInternal(
const req = codecForGetWithdrawalDetailsForUri().decode(payload);
return await getWithdrawalDetailsForUri(ws, req.talerWithdrawUri);
}
+ case "getExchangeWithdrawalInfo": {
+ const req = codecForGetExchangeWithdrawalInfo().decode(payload);
+ return await getExchangeWithdrawalInfo(ws, req.exchangeBaseUrl, req.amount);
+ }
case "acceptManualWithdrawal": {
const req = codecForAcceptManualWithdrawalRequet().decode(payload);
const res = await acceptManualWithdrawal(