From fb6508de9d71600dbca59cb0e6a4c77e4f3f3ee5 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 16 Dec 2019 21:10:57 +0100 Subject: finish refresh correctly, display fees correctly --- src/operations/refresh.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/operations/refresh.ts') diff --git a/src/operations/refresh.ts b/src/operations/refresh.ts index f602221af..8390cac54 100644 --- a/src/operations/refresh.ts +++ b/src/operations/refresh.ts @@ -144,10 +144,22 @@ async function refreshCreateSession( return; } rg.finishedPerCoin[coinIndex] = true; + rg.finishedPerCoin[coinIndex] = true; + let allDone = true; + for (const f of rg.finishedPerCoin) { + if (!f) { + allDone = false; + break; + } + } + if (allDone) { + rg.timestampFinished = getTimestampNow(); + rg.retryInfo = initRetryInfo(false); + } await tx.put(Stores.refreshGroups, rg); }, ); - ws.notify({ type: NotificationType.RefreshRefused }); + ws.notify({ type: NotificationType.RefreshUnwarranted }); return; } -- cgit v1.2.3