You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed this issue when trying to connect wallets in my web app using bitcoin-connect. There were inconsistencies in the wait time when connecting a wallet as sometimes the wallet would load for a full minute which just seemed like bad UX for an end user. I traced this long wait time to the 1 minute replyTimeout found in the executeMultiNip47Request method when the getInfo method found in NWCClient.ts was called.
Fix
The 60 seconds timeout add an optional argument for timeout to the executeMultiNip47Request method. This allows getInfo to pass a shorter timeout duration when it is called. This would allow for a longer timeout when needed for other events like pay_invoice and a shorter timeout when it is needed
The text was updated successfully, but these errors were encountered:
@Dayvvo thanks for raising this! I agree, it would be nice to be able to pass custom values per call and have sensible defaults for different methods. e.g. payments could still be 60 seconds (sometimes they take longer than expected) but get_info could be 10 seconds.
Alright! I'll open a PR regarding this. I'm thinking we could make the timeout customiseable for both replytimeout and publish timeout should there be a use case for it!
Problem definition:
I noticed this issue when trying to connect wallets in my web app using bitcoin-connect. There were inconsistencies in the wait time when connecting a wallet as sometimes the wallet would load for a full minute which just seemed like bad UX for an end user. I traced this long wait time to the 1 minute replyTimeout found in the
executeMultiNip47Request
method when thegetInfo
method found in NWCClient.ts was called.Fix
The 60 seconds timeout add an optional argument for timeout to the
executeMultiNip47Request
method. This allowsgetInfo
to pass a shorter timeout duration when it is called. This would allow for a longer timeout when needed for other events likepay_invoice
and a shorter timeout when it is neededThe text was updated successfully, but these errors were encountered: