From 4627c0781c982421585e4adf9e3320b56f644965 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 24 May 2023 12:58:33 +0200 Subject: wallet-core: report number of coins in withdrawal details --- packages/taler-wallet-core/src/wallet.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/taler-wallet-core/src/wallet.ts') diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 6009ff096..da9445602 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -1107,12 +1107,17 @@ async function dispatchRequestInternal( Amounts.parseOrThrow(req.amount), req.restrictAge, ); + let numCoins = 0; + for (const x of wi.selectedDenoms.selectedDenoms) { + numCoins += x.count; + } const resp: ManualWithdrawalDetails = { amountRaw: req.amount, amountEffective: Amounts.stringify(wi.selectedDenoms.totalCoinValue), paytoUris: wi.exchangePaytoUris, tosAccepted: wi.termsOfServiceAccepted, ageRestrictionOptions: wi.ageRestrictionOptions, + numCoins, }; return resp; } -- cgit v1.2.3