aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-05-04 16:11:12 -0300
committerSebastian <sebasjm@gmail.com>2022-05-04 16:26:53 -0300
commit4491118494c332c9ce0a0c4533804744d63701f2 (patch)
tree883cef2f190321bf07d0d1b53f5842e9c9c6ddbd /packages/taler-wallet-core/src/wallet.ts
parentf16d2e52d51b931d18abd9d87568be681339350f (diff)
downloadwallet-core-4491118494c332c9ce0a0c4533804744d63701f2.tar.xz
add restricted option to manual withdraw
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index fb61ae0dc..053a0763b 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -454,11 +454,14 @@ async function acceptManualWithdrawal(
ws: InternalWalletState,
exchangeBaseUrl: string,
amount: AmountJson,
+ restrictAge?: number,
+
): Promise<AcceptManualWithdrawalResult> {
try {
const resp = await createReserve(ws, {
amount,
exchange: exchangeBaseUrl,
+ restrictAge
});
const exchangePaytoUris = await ws.db
.mktx((x) => ({
@@ -690,6 +693,7 @@ async function dumpCoins(ws: InternalWalletState): Promise<CoinDumpJson> {
remaining_value: Amounts.stringify(c.currentAmount),
withdrawal_reserve_pub: withdrawalReservePub,
coin_suspended: c.suspended,
+ ageCommitmentProof: c.ageCommitmentProof,
});
}
});
@@ -801,6 +805,7 @@ async function dispatchRequestInternal(
ws,
req.exchangeBaseUrl,
Amounts.parseOrThrow(req.amount),
+ req.restrictAge
);
return res;
}