summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-11-28 19:17:38 +0100
committerFlorian Dold <florian@dold.me>2023-11-28 19:17:38 +0100
commit27578b07404370351b5b511b3d3af0e8b2c77223 (patch)
tree7107dfb90e6424411da61e2228c1cfd17e0e2012 /packages/taler-wallet-core/src/wallet.ts
parent629cb08490adf1be26a811d743d8152de48a3c2a (diff)
downloadwallet-core-27578b07404370351b5b511b3d3af0e8b2c77223.tar.gz
wallet-core-27578b07404370351b5b511b3d3af0e8b2c77223.tar.bz2
wallet-core-27578b07404370351b5b511b3d3af0e8b2c77223.zip
wallet-core: only specify transfer amount for currency conversion withdrawals
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index 6b9e960ce..507d72cce 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -52,6 +52,7 @@ import {
NotificationType,
RecoverStoredBackupRequest,
RefreshReason,
+ ScopeType,
StoredBackupList,
TalerError,
TalerErrorCode,
@@ -1209,6 +1210,7 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>(
for (const x of wi.selectedDenoms.selectedDenoms) {
numCoins += x.count;
}
+ const amt = Amounts.parseOrThrow(req.amount);
const resp: ManualWithdrawalDetails = {
amountRaw: req.amount,
amountEffective: Amounts.stringify(wi.selectedDenoms.totalCoinValue),
@@ -1217,6 +1219,12 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>(
ageRestrictionOptions: wi.ageRestrictionOptions,
withdrawalAccountList: wi.exchangeCreditAccountDetails,
numCoins,
+ // FIXME: Once we have proper scope info support, return correct info here.
+ scopeInfo: {
+ type: ScopeType.Exchange,
+ currency: amt.currency,
+ url: req.exchangeBaseUrl,
+ },
};
return resp;
}