wallet-core: check for broken transactions
This commit is contained in:
parent
860cd81f35
commit
cefec08ce7
@ -24,6 +24,7 @@ import {
|
|||||||
constructPayPullUri,
|
constructPayPullUri,
|
||||||
constructPayPushUri,
|
constructPayPushUri,
|
||||||
ExtendedStatus,
|
ExtendedStatus,
|
||||||
|
j2s,
|
||||||
Logger,
|
Logger,
|
||||||
OrderShortInfo,
|
OrderShortInfo,
|
||||||
PaymentStatus,
|
PaymentStatus,
|
||||||
@ -1348,6 +1349,18 @@ export async function getTransactions(
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// One-off checks, because of a bug where the wallet previously
|
||||||
|
// did not migrate the DB correctly and caused these amounts
|
||||||
|
// to be missing sometimes.
|
||||||
|
for (let tx of transactions) {
|
||||||
|
if (!tx.amountEffective) {
|
||||||
|
logger.warn(`missing amountEffective in ${j2s(tx)}`);
|
||||||
|
}
|
||||||
|
if (!tx.amountRaw) {
|
||||||
|
logger.warn(`missing amountRaw in ${j2s(tx)}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const txPending = transactions.filter((x) => x.pending);
|
const txPending = transactions.filter((x) => x.pending);
|
||||||
const txNotPending = transactions.filter((x) => !x.pending);
|
const txNotPending = transactions.filter((x) => !x.pending);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user