wallet-core: report coins in dump-coins even when withdrawal transaction was deleted
This commit is contained in:
parent
6a4da88719
commit
97fac057c2
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user