aboutsummaryrefslogtreecommitdiff
path: root/src/operations/refresh.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-12-16 21:10:57 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-12-16 21:10:57 +0100
commitfb6508de9d71600dbca59cb0e6a4c77e4f3f3ee5 (patch)
tree8f1e9e50574ee6d9f561cb93d2ea29663943672d /src/operations/refresh.ts
parentc2ee8fd9ab6754275d7423152681236a46cf36a9 (diff)
finish refresh correctly, display fees correctly
Diffstat (limited to 'src/operations/refresh.ts')
-rw-r--r--src/operations/refresh.ts14
1 files changed, 13 insertions, 1 deletions
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;
}