amethyst icon indicating copy to clipboard operation
amethyst copied to clipboard

[BUG] NWC Settings Not Saving

Open AnthonyRonning opened this issue 2 years ago • 9 comments

Describe the bug There's been a few times that NWC settings are not completely saving/persisting. Typically it's when there was one already.

To Reproduce Steps to reproduce the behavior:

  1. Have an NWC string already filled out
  2. Scan QR code
  3. Save
  4. Try to zap and see which one it goes to
  5. Sometimes close and reopen and it's a different one

When doing in the nostr deep link and there's already an NWC in there, it will act like it saves but it's still the old one.

Expected behavior When changing NWC, it should change.

Device (please complete the following information):

  • Phone Brand/Model [e.g. Pixel 7 Pro]: Pixel Fold
  • Android Version [e.g. 33]: Latest
  • App Version [e.g. v0.20.3]: 0.75-13-Play

Bounty (in Bitcoin sats) offered for a solution None

AnthonyRonning avatar Sep 07 '23 20:09 AnthonyRonning

Is deleting the info and saving a workaround? If you can suggest another NWC-supporting service besides Alby, I'll try to test.

OrigiSize avatar Sep 09 '23 19:09 OrigiSize

No, because it's a silent amethyst error, the fault looks like it's on the NWC provider. So there's no indication that they need to manually delete it. Further, there's no easy way to manually delete.

https://app.mutinywallet.com/settings/connections?callbackUri=nostr&name=Amethyst

AnthonyRonning avatar Sep 09 '23 20:09 AnthonyRonning

@TonyGiorgio can you check the URI you create when transferring back to Amethyst?

I am getting a nostr://, but it should be nostr+walletconnect:b889ff5b1513b64...

vitorpamplona avatar Sep 22 '23 19:09 vitorpamplona

@TonyGiorgio can you check the URI you create when transferring back to Amethyst?

I am getting a nostr://, but it should be nostr+walletconnect:b889ff5b1513b64...

The callback uri is whatever you set it in the URL. I guess for the above it would be

https://app.mutinywallet.com/settings/connections?callbackUri=nostr+walletconnect&name=Amethyst

Mistyped it. Though you should probably set it to be whatever amethyst is registered as if you want to ensure it comes back without needing user app selection.

AnthonyRonning avatar Sep 22 '23 19:09 AnthonyRonning

Great, I got Amethyst to open the URI correctly. Now I am trying to reproduce this error.

On another note:

  1. is your relay replying with errors? I don't get anything when I don't have a balance.
  2. is it possible to solve the wallet is open on another tab issue? If I add the button to Mutiny, like Alby has, it always opens a new tab. So, it always crashes the wallet :(

vitorpamplona avatar Sep 22 '23 19:09 vitorpamplona

is your relay replying with errors? I don't get anything when I don't have a balance.

We don't support responding with balance

is it possible to solve the wallet is open on another tab issue? If I add the button to Mutiny, like Alby has, it always opens a new tab. So, it always crashes the wallet :(

If you have it installed as a PWA it might open up in that. Otherwise, the android app will handle that app link. But also just closing the existing tab should fix it. It's not safe to run in two tabs at the same time.

AnthonyRonning avatar Sep 22 '23 20:09 AnthonyRonning

We don't support responding with balance

Not with a balance, but with an error saying that the person doesn't have a balance to pay the invoice. Right now I am not getting any error msg back to the app.

Otherwise, the android app will handle that app link.

Are you sure? I have it installed as a PWA, but the link always goes back to the browser. I am not sure how to make the PWA app open it form inside amethyst.

vitorpamplona avatar Sep 22 '23 20:09 vitorpamplona

Yeah our relay might not be responding with certain responses, can take a look at that.

The android native app should work, but yeah I guess the PWA might not be allowed to hijack app links like native apps can.

AnthonyRonning avatar Sep 22 '23 20:09 AnthonyRonning

This is still happening and it's causing confusion for Mutiny users.

https://github.com/MutinyWallet/mutiny-web/issues/1086

AnthonyRonning avatar Apr 22 '24 17:04 AnthonyRonning