aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/wallet.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index 8ae4b2b7b..b3fee6bff 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -536,7 +536,7 @@ async function listKnownBankAccounts(
ws: InternalWalletState,
currency?: string,
): Promise<KnownBankAccounts> {
- const accounts: PaytoUri[] = [];
+ const accounts: { [account: string]: PaytoUri } = {};
await ws.db
.mktx((x) => ({
withdrawalGroups: x.withdrawalGroups,
@@ -548,9 +548,11 @@ async function listKnownBankAccounts(
if (currency && currency !== amount.currency) {
continue;
}
- const payto = r.senderWire ? parsePaytoUri(r.senderWire) : undefined;
- if (payto) {
- accounts.push(payto);
+ if (r.senderWire) {
+ const payto = parsePaytoUri(r.senderWire);
+ if (payto) {
+ accounts[r.senderWire] = payto;
+ }
}
}
});