diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-03-12 00:44:28 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-03-12 00:44:28 +0530 |
commit | 2c52046f0bf358a5e07c53394b3b72d091356cce (patch) | |
tree | 8993c992b9c8240ee865671cdfbab380e61af96c /src/operations/history.ts | |
parent | 6e2881fabf74a3c1da8e94dcbe3e68fce6080d9e (diff) | |
download | wallet-core-2c52046f0bf358a5e07c53394b3b72d091356cce.tar.xz |
full recoup, untested/unfinished first attempt
Diffstat (limited to 'src/operations/history.ts')
-rw-r--r-- | src/operations/history.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/operations/history.ts b/src/operations/history.ts index 2fb7854d2..2cf215a5a 100644 --- a/src/operations/history.ts +++ b/src/operations/history.ts @@ -181,6 +181,7 @@ export async function getHistory( Stores.payEvents, Stores.refundEvents, Stores.reserveUpdatedEvents, + Stores.recoupGroups, ], async tx => { tx.iter(Stores.exchanges).forEach(exchange => { @@ -485,6 +486,16 @@ export async function getHistory( amountRefundedInvalid: Amounts.toString(amountRefundedInvalid), }); }); + + tx.iter(Stores.recoupGroups).forEach(rg => { + if (rg.timestampFinished) { + history.push({ + type: HistoryEventType.FundsRecouped, + timestamp: rg.timestampFinished, + eventId: makeEventId(HistoryEventType.FundsRecouped, rg.recoupGroupId), + }); + } + }); }, ); |