diff options
author | Sebastian <sebasjm@gmail.com> | 2022-01-10 15:08:45 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-01-10 16:07:27 -0300 |
commit | 83b9d32b7812e63640a60b5b42a27c96d8053bce (patch) | |
tree | 28490c1a38dc6a5ed58d1d698e15d06c0db811e6 /packages | |
parent | efaa4af6482a641a8c9dd9a65aac693768534310 (diff) |
filter out exchanges with other currency when doing currency selection for deposit
Diffstat (limited to 'packages')
-rw-r--r-- | packages/taler-wallet-core/src/operations/deposits.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts index 6d28c23e5..0a90e0216 100644 --- a/packages/taler-wallet-core/src/operations/deposits.ts +++ b/packages/taler-wallet-core/src/operations/deposits.ts @@ -367,7 +367,7 @@ export async function getFeeForDeposit( const allExchanges = await tx.exchanges.iter().toArray(); for (const e of allExchanges) { const details = await getExchangeDetails(tx, e.baseUrl); - if (!details) { + if (!details || amount.currency !== details.currency) { continue; } exchangeInfos.push({ @@ -461,7 +461,7 @@ export async function createDepositGroup( const allExchanges = await tx.exchanges.iter().toArray(); for (const e of allExchanges) { const details = await getExchangeDetails(tx, e.baseUrl); - if (!details) { + if (!details || amount.currency !== details.currency) { continue; } exchangeInfos.push({ |