Commit Graph

22 Commits

Author SHA1 Message Date
ekzyis 62a922247d
Add timeouts to all wallet API calls (#1722)
* Add timeout to all wallet API calls

* Pass timeout signal to wallet API

* Fix timeout error message not shown on timeout

* Fix cross-fetch throws generic error message on abort

* Fix wrong method in error message

* Always use FetchTimeoutError

* Catch NDK timeout error to replace with custom timeout error

* Also use 15s for NWC connect timeout

* Add timeout delay
2024-12-16 14:05:31 -06:00
ekzyis 285203889d Remove unused import 2024-12-13 21:20:51 +01:00
ekzyis a50a2c8bd1
Fix receiver fallbacks depend on fast polls (#1723) 2024-12-13 14:19:00 -06:00
ekzyis a46f81f1e1
Receiver fallbacks (#1688)
* Use same naming scheme between ln containers and env vars

* Add router_lnd container

* Only open channels to router_lnd

* Use 1sat base fee and 0ppm fee rate

* Add script to test routing

* Also fund router_lnd wallet

* Receiver fallbacks

* Rename to predecessorId

* Remove useless wallet table join

* Missing renaming to predecessor

* Fix payment stuck on sender error

We want to await the invoice poll promise so we can check for receiver errors, but in case of sender errors, the promise will never settle.

* Don't log failed forwards as sender errors

* fix check for receiver error

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
2024-12-10 14:15:29 -06:00
ekzyis ec904e6b4c
Move useInvoice and useQrPayment into own files (#1686) 2024-12-05 08:52:32 -06:00
k00b 105f7b07e5 make fallback retry cache updates a special case 2024-11-28 11:22:46 -06:00
k00b cb028d217c fix zap fallback retries in notifications 2024-11-28 10:48:22 -06:00
k00b 6b59e1fa75 usesendwallets 2024-11-27 19:39:20 -06:00
k00b 67f6c170aa readability improvements 2024-11-27 18:39:23 -06:00
k00b b608fb6848 refactor out array of hooks 2024-11-27 17:31:08 -06:00
ekzyis 9cfc18d655 Return latest state of paid or failed invoice 2024-11-27 23:00:27 +01:00
ekzyis 0051c82415 Fix invoice retry even if no payment was attempted 2024-11-27 23:00:27 +01:00
ekzyis 14a92ee5ce Fix filter for wallets that can send
Testing for canSend is not enough since it can also return true if the wallet is not enabled.

This is the case because we want to allow disabling wallets but canSend must still return true in this case if send is configured.

This should probably be changed such that canSend only returns true when the wallet is enabled without preventing disabling of wallets.
2024-11-27 23:00:27 +01:00
ekzyis b1cdd953a0 Return last attempted invoice in canceled state 2024-11-27 23:00:27 +01:00
ekzyis be4ce5daf9 Allow retries of pessimistic actions 2024-11-27 23:00:27 +01:00
ekzyis 1f2b717da9 Fix last wallet not returning new invoice 2024-11-27 23:00:27 +01:00
ekzyis 413f76c33a Refactor wallet error handling with inheritance 2024-11-27 23:00:27 +01:00
ekzyis ed82d9cfc0 Fix payments if recv-only wallet enabled 2024-11-27 23:00:27 +01:00
ekzyis d99caa43fc Remove unnecessary sort 2024-11-27 23:00:27 +01:00
ekzyis 7036804c67 Fix old invoice passed to QR code 2024-11-27 23:00:27 +01:00
ekzyis 7742257470 Fix TypeError 2024-11-27 23:00:27 +01:00
ekzyis 5218a03b3a sender fallbacks 2024-11-27 23:00:27 +01:00