diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-05 22:17:01 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-05 22:17:01 +0100 |
commit | 8115ac660cd9d12ef69ca80fc2e4cf8eec6b1ba1 (patch) | |
tree | 1190c1e16fb620d7812b1f26b03f20ed9615e795 /src/wallet-impl/pending.ts | |
parent | f67d7f54f9d0fed97446898942e3dfee67ee2985 (diff) |
fix refunds
Diffstat (limited to 'src/wallet-impl/pending.ts')
-rw-r--r-- | src/wallet-impl/pending.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wallet-impl/pending.ts b/src/wallet-impl/pending.ts index bd10538af..c86ed6959 100644 --- a/src/wallet-impl/pending.ts +++ b/src/wallet-impl/pending.ts @@ -32,7 +32,9 @@ import { ReserveRecordStatus, CoinStatus, ProposalStatus, + PurchaseStatus, } from "../dbTypes"; +import { assertUnreachable } from "../util/assertUnreachable"; function updateRetryDelay( oldDelay: Duration, @@ -353,7 +355,7 @@ async function gatherPurchasePending( onlyDue: boolean = false, ): Promise<void> { await tx.iter(Stores.purchases).forEach((pr) => { - if (pr.finished) { + if (pr.status === PurchaseStatus.Dormant) { return; } resp.nextRetryDelay = updateRetryDelay( @@ -369,6 +371,9 @@ async function gatherPurchasePending( givesLifeness: true, isReplay: false, proposalId: pr.proposalId, + status: pr.status, + retryInfo: pr.retryInfo, + lastError: pr.lastError, }); }); |