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/pay-peer-push-credit.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/pay-peer-push-credit.ts')
-rw-r--r-- | packages/taler-wallet-core/src/pay-peer-push-credit.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/pay-peer-push-credit.ts b/packages/taler-wallet-core/src/pay-peer-push-credit.ts index 02b07c429..bd4adc0b6 100644 --- a/packages/taler-wallet-core/src/pay-peer-push-credit.ts +++ b/packages/taler-wallet-core/src/pay-peer-push-credit.ts @@ -857,6 +857,10 @@ export async function processPeerPushCredit( wex: WalletExecutionContext, peerPushCreditId: string, ): Promise<TaskRunResult> { + if (!wex.ws.networkAvailable) { + return TaskRunResult.networkRequired(); + } + let peerInc: PeerPushPaymentIncomingRecord | undefined; let contractTerms: PeerContractTerms | undefined; await wex.db.runReadWriteTx( |