From 0c5cb8cb9ead067144cd60af05596429afac04bd Mon Sep 17 00:00:00 2001 From: calle <93376500+callebtc@users.noreply.github.com> Date: Wed, 27 Jul 2022 15:29:44 +0200 Subject: [PATCH] Wallets: increase timeouts (#787) * increase pay timeouts to infinite --- lnbits/wallets/eclair.py | 2 +- lnbits/wallets/lnbits.py | 2 +- lnbits/wallets/lndrest.py | 2 +- lnbits/wallets/lnpay.py | 2 +- lnbits/wallets/lntxbot.py | 2 +- lnbits/wallets/opennode.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lnbits/wallets/eclair.py b/lnbits/wallets/eclair.py index 0ac3fd2a..c878d0d1 100644 --- a/lnbits/wallets/eclair.py +++ b/lnbits/wallets/eclair.py @@ -97,7 +97,7 @@ class EclairWallet(Wallet): f"{self.url}/payinvoice", headers=self.auth, data={"invoice": bolt11, "blocking": True}, - timeout=40, + timeout=None, ) if "error" in r.json(): diff --git a/lnbits/wallets/lnbits.py b/lnbits/wallets/lnbits.py index 55186196..d2ddb7ff 100644 --- a/lnbits/wallets/lnbits.py +++ b/lnbits/wallets/lnbits.py @@ -88,7 +88,7 @@ class LNbitsWallet(Wallet): url=f"{self.endpoint}/api/v1/payments", headers=self.key, json={"out": True, "bolt11": bolt11}, - timeout=100, + timeout=None, ) ok, checking_id, fee_msat, error_message = not r.is_error, None, 0, None diff --git a/lnbits/wallets/lndrest.py b/lnbits/wallets/lndrest.py index 56d18dc4..575db64d 100644 --- a/lnbits/wallets/lndrest.py +++ b/lnbits/wallets/lndrest.py @@ -111,7 +111,7 @@ class LndRestWallet(Wallet): url=f"{self.endpoint}/v1/channels/transactions", headers=self.auth, json={"payment_request": bolt11, "fee_limit": lnrpcFeeLimit}, - timeout=180, + timeout=None, ) if r.is_error or r.json().get("payment_error"): diff --git a/lnbits/wallets/lnpay.py b/lnbits/wallets/lnpay.py index 807d7253..7171ec3f 100644 --- a/lnbits/wallets/lnpay.py +++ b/lnbits/wallets/lnpay.py @@ -84,7 +84,7 @@ class LNPayWallet(Wallet): f"{self.endpoint}/wallet/{self.wallet_key}/withdraw", headers=self.auth, json={"payment_request": bolt11}, - timeout=180, + timeout=None, ) try: diff --git a/lnbits/wallets/lntxbot.py b/lnbits/wallets/lntxbot.py index 47a1f6c1..3c758e6c 100644 --- a/lnbits/wallets/lntxbot.py +++ b/lnbits/wallets/lntxbot.py @@ -82,7 +82,7 @@ class LntxbotWallet(Wallet): f"{self.endpoint}/payinvoice", headers=self.auth, json={"invoice": bolt11}, - timeout=100, + timeout=None, ) if "error" in r.json(): diff --git a/lnbits/wallets/opennode.py b/lnbits/wallets/opennode.py index 6d3fb02c..d503b4dd 100644 --- a/lnbits/wallets/opennode.py +++ b/lnbits/wallets/opennode.py @@ -85,7 +85,7 @@ class OpenNodeWallet(Wallet): f"{self.endpoint}/v2/withdrawals", headers=self.auth, json={"type": "ln", "address": bolt11}, - timeout=180, + timeout=None, ) if r.is_error: