From 97fac057c2f66cf8c00e50c555b761d5062fb4cf Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 14 Feb 2023 12:30:44 +0100 Subject: wallet-core: report coins in dump-coins even when withdrawal transaction was deleted --- packages/taler-wallet-core/src/wallet.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'packages/taler-wallet-core') 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 { 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 { } 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 { c.denomPubHash, ); if (!denomInfo) { - console.error("no denomination found for coin"); + logger.warn("no denomination found for coin"); continue; } coinsJson.coins.push({ -- cgit v1.2.3