commit cff460cf2913766098dadb6072447c57bcad6fdc
parent 8e213e9dd027da6f51f2bb7a23a0fa24fed84041
Author: Florian Dold <florian@dold.me>
Date: Sun, 3 Aug 2025 21:19:12 +0200
wallet-core: remove duplicate, buggy code with call to helper
Diffstat:
1 file changed, 3 insertions(+), 25 deletions(-)
diff --git a/packages/taler-wallet-core/src/deposits.ts b/packages/taler-wallet-core/src/deposits.ts
@@ -2131,31 +2131,9 @@ export async function createDepositGroup(
const amount = Amounts.parseOrThrow(req.amount);
const currency = amount.currency;
- const exchangeInfos: Exchange[] = [];
-
- await wex.db.runAllStoresReadOnlyTx({}, async (tx) => {
- const allExchanges = await tx.exchanges.iter().toArray();
- for (const e of allExchanges) {
- const details = await getExchangeWireDetailsInTx(tx, e.baseUrl);
- if (!details || amount.currency !== details.currency) {
- continue;
- }
- if (req.restrictScope) {
- const inScope = await checkExchangeInScopeTx(
- tx,
- e.baseUrl,
- req.restrictScope,
- );
- if (!inScope) {
- break;
- }
- }
- exchangeInfos.push({
- master_pub: details.masterPublicKey,
- priority: 1,
- url: e.baseUrl,
- });
- }
+ const exchangeInfos: Exchange[] = await getExchangesForDeposit(wex, {
+ currency,
+ restrictScope: req.restrictScope,
});
const now = AbsoluteTime.now();