filter out exchanges with other currency when doing currency selection for deposit

This commit is contained in:
Sebastian 2022-01-10 15:08:45 -03:00
parent efaa4af648
commit 83b9d32b78
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1

View File

@ -367,7 +367,7 @@ export async function getFeeForDeposit(
const allExchanges = await tx.exchanges.iter().toArray(); const allExchanges = await tx.exchanges.iter().toArray();
for (const e of allExchanges) { for (const e of allExchanges) {
const details = await getExchangeDetails(tx, e.baseUrl); const details = await getExchangeDetails(tx, e.baseUrl);
if (!details) { if (!details || amount.currency !== details.currency) {
continue; continue;
} }
exchangeInfos.push({ exchangeInfos.push({
@ -461,7 +461,7 @@ export async function createDepositGroup(
const allExchanges = await tx.exchanges.iter().toArray(); const allExchanges = await tx.exchanges.iter().toArray();
for (const e of allExchanges) { for (const e of allExchanges) {
const details = await getExchangeDetails(tx, e.baseUrl); const details = await getExchangeDetails(tx, e.baseUrl);
if (!details) { if (!details || amount.currency !== details.currency) {
continue; continue;
} }
exchangeInfos.push({ exchangeInfos.push({