summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-14 12:30:44 +0100
committerFlorian Dold <florian@dold.me>2023-02-14 12:30:44 +0100
commit97fac057c2f66cf8c00e50c555b761d5062fb4cf (patch)
treefb199394b54e1d3093cb9d1694fda53ed18bc7be /packages
parent6a4da88719bc7a1506433c1117b2402d2bd48f36 (diff)
downloadwallet-core-97fac057c2f66cf8c00e50c555b761d5062fb4cf.tar.gz
wallet-core-97fac057c2f66cf8c00e50c555b761d5062fb4cf.tar.bz2
wallet-core-97fac057c2f66cf8c00e50c555b761d5062fb4cf.zip
wallet-core: report coins in dump-coins even when withdrawal transaction was deleted
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-wallet-core/src/wallet.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index 57ae85c1c..a57c71bcf 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -910,7 +910,7 @@ async function dumpCoins(ws: InternalWalletState): Promise<CoinDumpJson> {
c.denomPubHash,
]);
if (!denom) {
- console.error("no denom session found for coin");
+ logger.warn("no denom found for coin");
continue;
}
const cs = c.coinSource;
@@ -920,12 +920,7 @@ async function dumpCoins(ws: InternalWalletState): Promise<CoinDumpJson> {
}
let withdrawalReservePub: string | undefined;
if (cs.type == CoinSourceType.Withdraw) {
- const ws = await tx.withdrawalGroups.get(cs.withdrawalGroupId);
- if (!ws) {
- console.error("no withdrawal session found for coin");
- continue;
- }
- withdrawalReservePub = ws.reservePub;
+ withdrawalReservePub = cs.reservePub;
}
const denomInfo = await ws.getDenomInfo(
ws,
@@ -934,7 +929,7 @@ async function dumpCoins(ws: InternalWalletState): Promise<CoinDumpJson> {
c.denomPubHash,
);
if (!denomInfo) {
- console.error("no denomination found for coin");
+ logger.warn("no denomination found for coin");
continue;
}
coinsJson.coins.push({