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/wallet.ts | |
parent | 6e2881fabf74a3c1da8e94dcbe3e68fce6080d9e (diff) | |
download | wallet-core-2c52046f0bf358a5e07c53394b3b72d091356cce.tar.xz |
full recoup, untested/unfinished first attempt
Diffstat (limited to 'src/wallet.ts')
-rw-r--r-- | src/wallet.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/wallet.ts b/src/wallet.ts index 23ac8490b..3b619f874 100644 --- a/src/wallet.ts +++ b/src/wallet.ts @@ -95,7 +95,6 @@ import { getHistory } from "./operations/history"; import { getPendingOperations } from "./operations/pending"; import { getBalances } from "./operations/balance"; import { acceptTip, getTipStatus, processTip } from "./operations/tip"; -import { recoup } from "./operations/recoup"; import { TimerGroup } from "./util/timer"; import { AsyncCondition } from "./util/promiseUtils"; import { AsyncOpMemoSingle } from "./util/asyncMemo"; @@ -113,6 +112,7 @@ import { applyRefund, } from "./operations/refund"; import { durationMin, Duration } from "./util/time"; +import { processRecoupGroup } from "./operations/recoup"; const builtinCurrencies: CurrencyRecord[] = [ { @@ -217,6 +217,9 @@ export class Wallet { case PendingOperationType.RefundApply: await processPurchaseApplyRefund(this.ws, pending.proposalId, forceNow); break; + case PendingOperationType.Recoup: + await processRecoupGroup(this.ws, pending.recoupGroupId, forceNow); + break; default: assertUnreachable(pending); } @@ -577,10 +580,6 @@ export class Wallet { return await this.db.iter(Stores.coins).toArray(); } - async getPaybackReserves(): Promise<ReserveRecord[]> { - return await this.db.iter(Stores.reserves).filter(r => r.hasPayback); - } - /** * Stop ongoing processing. */ |