From d88829cfa8dc7bf2967fb494af0290e068466828 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 23 Jul 2020 17:35:17 +0530 Subject: towards refunds with updated protocol --- src/operations/refresh.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/operations/refresh.ts') 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 => { + try { + await processRefreshGroup(ws, refreshGroupId); + } catch (e) { + logger.trace(`Error during refresh: ${e}`) + } + }; + + processAsync(); + return { refreshGroupId, }; -- cgit v1.2.3