summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/deposits.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/deposits.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/deposits.ts14
1 files changed, 9 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts
index 4c87f122f..59c27b9cc 100644
--- a/packages/taler-wallet-core/src/operations/deposits.ts
+++ b/packages/taler-wallet-core/src/operations/deposits.ts
@@ -58,6 +58,7 @@ import { InternalWalletState } from "./state";
import { Logger } from "../util/logging.js";
import { DepositGroupRecord, Stores } from "../db.js";
import { guardOperationException } from "./errors.js";
+import { getExchangeDetails } from "./exchanges.js";
/**
* Logger.
@@ -308,14 +309,17 @@ export async function createDepositGroup(
const allExchanges = await ws.db.iter(Stores.exchanges).toArray();
const exchangeInfos: { url: string; master_pub: string }[] = [];
for (const e of allExchanges) {
- if (!e.details) {
- continue;
- }
- if (e.details.currency != amount.currency) {
+ const details = await ws.db.runWithReadTransaction(
+ [Stores.exchanges, Stores.exchangeDetails],
+ async (tx) => {
+ return getExchangeDetails(tx, e.baseUrl);
+ },
+ );
+ if (!details) {
continue;
}
exchangeInfos.push({
- master_pub: e.details.masterPublicKey,
+ master_pub: details.masterPublicKey,
url: e.baseUrl,
});
}