diff options
author | Iván Ávalos <avalos@disroot.org> | 2024-06-21 17:15:13 -0600 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-06-26 16:32:05 +0200 |
commit | 7c989435fb7dabf689b16c4180b9f257d734663f (patch) | |
tree | 53c7ff2d15a1140d63e9a586fbc1fa88006dd2f9 /packages/taler-wallet-core/src/refresh.ts | |
parent | ca86c0a3463a46605d41af27fb62606427c9a217 (diff) | |
download | wallet-core-7c989435fb7dabf689b16c4180b9f257d734663f.tar.xz |
make tasks return network-required when offline
Diffstat (limited to 'packages/taler-wallet-core/src/refresh.ts')
-rw-r--r-- | packages/taler-wallet-core/src/refresh.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/refresh.ts b/packages/taler-wallet-core/src/refresh.ts index 9a5058a4d..f782d2445 100644 --- a/packages/taler-wallet-core/src/refresh.ts +++ b/packages/taler-wallet-core/src/refresh.ts @@ -1324,6 +1324,10 @@ export async function processRefreshGroup( wex: WalletExecutionContext, refreshGroupId: string, ): Promise<TaskRunResult> { + if (!wex.ws.networkAvailable) { + return TaskRunResult.networkRequired(); + } + logger.trace(`processing refresh group ${refreshGroupId}`); const refreshGroup = await wex.db.runReadOnlyTx( |