diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-16 12:53:22 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-16 12:53:22 +0100 |
commit | fa4621e70c48500a372504eb8ae9b9481531c555 (patch) | |
tree | 50c457c8c2133dfec32cb465e1b3902ce88fb209 /src/operations/pending.ts | |
parent | 1b9c5855a8afb6833ff7a706f5bed5650e1191ad (diff) | |
download | wallet-core-fa4621e70c48500a372504eb8ae9b9481531c555.tar.xz |
history events WIP
Diffstat (limited to 'src/operations/pending.ts')
-rw-r--r-- | src/operations/pending.ts | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/operations/pending.ts b/src/operations/pending.ts index b9b2c664e..252c9e98a 100644 --- a/src/operations/pending.ts +++ b/src/operations/pending.ts @@ -54,7 +54,7 @@ async function gatherExchangePending( } await tx.iter(Stores.exchanges).forEach(e => { switch (e.updateStatus) { - case ExchangeUpdateStatus.FINISHED: + case ExchangeUpdateStatus.Finished: if (e.lastError) { resp.pendingOperations.push({ type: PendingOperationType.Bug, @@ -89,7 +89,7 @@ async function gatherExchangePending( }); } break; - case ExchangeUpdateStatus.FETCH_KEYS: + case ExchangeUpdateStatus.FetchKeys: resp.pendingOperations.push({ type: PendingOperationType.ExchangeUpdate, givesLifeness: false, @@ -99,7 +99,7 @@ async function gatherExchangePending( reason: e.updateReason || "unknown", }); break; - case ExchangeUpdateStatus.FETCH_WIRE: + case ExchangeUpdateStatus.FetchWire: resp.pendingOperations.push({ type: PendingOperationType.ExchangeUpdate, givesLifeness: false, @@ -109,6 +109,16 @@ async function gatherExchangePending( reason: e.updateReason || "unknown", }); break; + case ExchangeUpdateStatus.FinalizeUpdate: + resp.pendingOperations.push({ + type: PendingOperationType.ExchangeUpdate, + givesLifeness: false, + stage: "finalize-update", + exchangeBaseUrl: e.baseUrl, + lastError: e.lastError, + reason: e.updateReason || "unknown", + }); + break; default: resp.pendingOperations.push({ type: PendingOperationType.Bug, @@ -311,7 +321,7 @@ async function gatherTipPending( if (onlyDue && tip.retryInfo.nextRetry.t_ms > now.t_ms) { return; } - if (tip.accepted) { + if (tip.acceptedTimestamp) { resp.pendingOperations.push({ type: PendingOperationType.TipPickup, givesLifeness: true, |