summaryrefslogtreecommitdiff
path: root/src/operations/refresh.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-23 17:35:17 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-23 17:35:17 +0530
commitd88829cfa8dc7bf2967fb494af0290e068466828 (patch)
tree682faf6027e572e2c28b548d65b0045692b2da29 /src/operations/refresh.ts
parente60563fb540c04d9ba751fea69c1fc0f1de598b5 (diff)
downloadwallet-core-d88829cfa8dc7bf2967fb494af0290e068466828.tar.gz
wallet-core-d88829cfa8dc7bf2967fb494af0290e068466828.tar.bz2
wallet-core-d88829cfa8dc7bf2967fb494af0290e068466828.zip
towards refunds with updated protocol
Diffstat (limited to 'src/operations/refresh.ts')
-rw-r--r--src/operations/refresh.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/operations/refresh.ts b/src/operations/refresh.ts
index 4d477d644..74b032b91 100644
--- a/src/operations/refresh.ts
+++ b/src/operations/refresh.ts
@@ -535,6 +535,7 @@ async function processRefreshSession(
* Create a refresh group for a list of coins.
*/
export async function createRefreshGroup(
+ ws: InternalWalletState,
tx: TransactionHandle,
oldCoinPubs: CoinPublicKey[],
reason: RefreshReason,
@@ -554,6 +555,17 @@ export async function createRefreshGroup(
};
await tx.put(Stores.refreshGroups, refreshGroup);
+
+ const processAsync = async (): Promise<void> => {
+ try {
+ await processRefreshGroup(ws, refreshGroupId);
+ } catch (e) {
+ logger.trace(`Error during refresh: ${e}`)
+ }
+ };
+
+ processAsync();
+
return {
refreshGroupId,
};