summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/currencies.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/currencies.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/currencies.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/currencies.ts b/packages/taler-wallet-core/src/operations/currencies.ts
index 1af30dfb5..5371d4a54 100644
--- a/packages/taler-wallet-core/src/operations/currencies.ts
+++ b/packages/taler-wallet-core/src/operations/currencies.ts
@@ -19,6 +19,7 @@
*/
import { ExchangeRecord, Stores } from "../db.js";
import { Logger } from "../index.js";
+import { getExchangeDetails } from "./exchanges.js";
import { InternalWalletState } from "./state.js";
const logger = new Logger("currencies.ts");
@@ -37,7 +38,12 @@ export async function getExchangeTrust(
): Promise<TrustInfo> {
let isTrusted = false;
let isAudited = false;
- const exchangeDetails = exchangeInfo.details;
+ const exchangeDetails = await ws.db.runWithReadTransaction(
+ [Stores.exchangeDetails, Stores.exchanges],
+ async (tx) => {
+ return getExchangeDetails(tx, exchangeInfo.baseUrl);
+ },
+ );
if (!exchangeDetails) {
throw Error(`exchange ${exchangeInfo.baseUrl} details not available`);
}