summaryrefslogtreecommitdiff
path: root/src/wallet.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-03-12 00:44:28 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-03-12 00:44:28 +0530
commit2c52046f0bf358a5e07c53394b3b72d091356cce (patch)
tree8993c992b9c8240ee865671cdfbab380e61af96c /src/wallet.ts
parent6e2881fabf74a3c1da8e94dcbe3e68fce6080d9e (diff)
downloadwallet-core-2c52046f0bf358a5e07c53394b3b72d091356cce.tar.gz
wallet-core-2c52046f0bf358a5e07c53394b3b72d091356cce.tar.bz2
wallet-core-2c52046f0bf358a5e07c53394b3b72d091356cce.zip
full recoup, untested/unfinished first attempt
Diffstat (limited to 'src/wallet.ts')
-rw-r--r--src/wallet.ts9
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.
*/