-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve NWC support (return response from send payment, get_balance, make_invoice/lookup_invoice) #895
Comments
The response event is a problem with our relay. What is the filter you're using to try and get it? |
@benthecarman we use this code: const event = await this.signEvent(unsignedEvent);
const sub = this.relay.sub([
{
kinds: [23195],
authors: [this.walletServicePubkey],
"#e": [event.id],
},
]); |
Ah okay, looks like we were only allowing filters that had the |
We haven't done |
Is there any |
@TonyGiorgio good point, it would be nice to add a That is currently how WebLN does it: https://www.webln.guide/building-lightning-apps/webln-reference/webln.getinfo - I think this makes sense because it can be per-connection (not per-wallet-service as per the NIP-47 info event) I will add a suggestion there. |
There is the info event that you create when you create the NWC, but yeah adding to the |
We added a NWC connector to the Alby extension and it will be shipped soon. It uses the get_info event which unfortunately fails with Mutiny. If you make any progress here please let us know. I think it's cool to use your Mutiny wallet and pay on desktop using Alby with WebLN 🚀 |
What is it that you need out of the |
@TonyGiorgio if the Currently we use Adding extra support to Mutiny for the extension methods is not necessary, it'll just improve the UX in the Alby extension (and Bitcoin Connect). |
We definitely want to support most of the functions. I don't think |
@benthecarman I think it's ok to require the user to have their wallet open while using the Alby extension. We can add instructions there. Currently the WebLN spec assumes the web application connected to a wallet can get a response directly from that wallet (e.g. within 60 seconds). |
Okay if that is fine with you guys I guess that's okay. |
By the way, was MutinyWallet/blastr#31 deployed? I still didn't seem to get a response event when I tested paying again today. |
It is. I tested with the filter you gave me and was able to get a response |
@benthecarman thanks! it seems to be working now. The first payment I did failed with this error but then the next two succeeded. Can you check the error code?
|
It says payment timed out. That normally means the payment will fail. We send this if the payment hasn't completed after 30 seconds. The insufficient balance code isn't the best but not sure of a better error code that'd fit. |
@benthecarman would it make sense to add one in the extensions PR? to me it just feels confusing because I had sufficient balance. |
Currently doing concurrent requests cause all the requests to time out (e.g. if there is an outstanding get_balance or get_info request, I never get a response for send_payment even though the payment is sent). Are there any restrictions on your side we need to be aware of? |
Looks like |
Sounds like a bug on our side, I think I might know the cause |
Added what I think is a fix in #905. We weren't responding to events with different commands instead of sending |
@benthecarman thanks for looking into it. We currently set a timeout of 60 seconds so we also time out there, but I think more than 60 seconds is too long for a user to wait in our case. I will try again when the fix is merged |
Hi, we added a mutiny wallet connector to Bitcoin Connect so you can connect to your wallet in any lightning webapp and seamlessly execute lightning functionality, as long as the wallet is open on a second device (e.g. keep the Mutiny wallet open on your PC and then use Bitcoin Connect to connect to it on your phone).
Unfortunately there are some issues:
I created an issue here: getAlby/bitcoin-connect#150
The text was updated successfully, but these errors were encountered: