aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index 868ac3adc..24e8d3f8f 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -29,6 +29,7 @@ import {
BankWithdrawDetails,
CancellationToken,
CoinStatus,
+ CurrencySpecification,
DenomKeyType,
DenomSelectionState,
Duration,
@@ -61,6 +62,7 @@ import {
canonicalizeBaseUrl,
codecForBankWithdrawalOperationPostResponse,
codecForCashinConversionResponse,
+ codecForConversionBankConfig,
codecForExchangeWithdrawBatchResponse,
codecForIntegrationBankConfig,
codecForReserveStatus,
@@ -2600,6 +2602,7 @@ async function fetchWithdrawalAccountInfo(
for (let acct of exchangeDetails.wireInfo.accounts) {
let paytoUri: string;
let transferAmount: AmountString | undefined = undefined;
+ let currencySpecification: CurrencySpecification | undefined = undefined;
if (acct.conversion_url != null) {
const reqUrl = new URL("cashin-rate", acct.conversion_url);
reqUrl.searchParams.set(
@@ -2613,6 +2616,13 @@ async function fetchWithdrawalAccountInfo(
);
paytoUri = acct.payto_uri;
transferAmount = resp.amount_debit;
+ const configUrl = new URL("config", acct.conversion_url);
+ const configResp = await ws.http.fetch(configUrl.href);
+ const configParsed = await readSuccessResponseJsonOrThrow(
+ configResp,
+ codecForConversionBankConfig(),
+ );
+ currencySpecification = configParsed.fiat_currency_specification
if (req.reservePub) {
}
} else {
@@ -2630,6 +2640,7 @@ async function fetchWithdrawalAccountInfo(
const acctInfo: WithdrawalExchangeAccountDetails = {
paytoUri,
transferAmount,
+ currencySpecification,
creditRestrictions: acct.credit_restrictions,
};
if (transferAmount != null) {