aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-08-18 16:01:47 -0300
committerSebastian <sebasjm@gmail.com>2022-08-18 16:02:16 -0300
commitd1980c39fc2cf5054cfa9d3a03d685d75c2662d9 (patch)
tree3a605a565f975168bab6e67d1c1740bdd4310c79 /packages/taler-wallet-core/src/wallet.ts
parent23bb82f00cc83541527402bdd2d4309c530df674 (diff)
downloadwallet-core-d1980c39fc2cf5054cfa9d3a03d685d75c2662d9.tar.xz
moved wireInfo and denomInfo into taler-util so it can be used from the ui
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index 1b6b56691..593d2e0ff 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -553,6 +553,7 @@ async function getExchanges(
.mktx((x) => ({
exchanges: x.exchanges,
exchangeDetails: x.exchangeDetails,
+ denominations: x.denominations,
}))
.runReadOnly(async (tx) => {
const exchangeRecords = await tx.exchanges.iter().toArray();
@@ -567,6 +568,13 @@ async function getExchanges(
continue;
}
+ const denominations = await tx.denominations.indexes
+ .byExchangeBaseUrl.iter(r.baseUrl).toArray();
+
+ if (!denominations) {
+ continue;
+ }
+
exchanges.push({
exchangeBaseUrl: r.baseUrl,
currency,
@@ -577,6 +585,9 @@ async function getExchanges(
content: exchangeDetails.termsOfServiceText,
},
paytoUris: exchangeDetails.wireInfo.accounts.map((x) => x.payto_uri),
+ auditors: exchangeDetails.auditors,
+ wireInfo: exchangeDetails.wireInfo,
+ denominations: denominations,
});
}
});