Skip to content
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

Register bitcoin: URI handler #3294

Closed
tsusanka opened this issue Jan 25, 2021 · 7 comments · Fixed by #2879 or #4329
Closed

Register bitcoin: URI handler #3294

tsusanka opened this issue Jan 25, 2021 · 7 comments · Fixed by #2879 or #4329
Assignees

Comments

@tsusanka
Copy link
Contributor

tsusanka commented Jan 25, 2021

Clicking on a bitcoin: URI should open Suite and prefill the inputs if the infromation is available. See https://developer.bitcoin.org/devguide/payment_processing.html#bitcoin-uri and BIP-21 for more details.

Registering our own trezorsuite: handler is dealt with in #991.

@tomasklim
Copy link
Member

I created a basic flowchart that will help us to find a solution how to solve this issue.

https://miro.com/app/board/o9J_lBcHBug=/

@tomasklim
Copy link
Member

Ideas, bugs,... to follow-up issue #4313

@wendys-cats
Copy link
Contributor

wendys-cats commented Oct 4, 2021

QA NOK (WIP, results will be added to this comment)

1. Send button is disabled when autofill is applied BUG
When info from bitcoin: URI handler is autofilled, Suite does not automatically convert the coin amount into FIAT amount and fill the FIAT field, which is needed for Send button to become enabled.
Once coin amount is changed, or FIAT type is (re-)selected, Suite converts the coin amount into FIAT and enables Send button. Also, if the URI handler is in QR form, this does not seem to be an issue, even though FIAT value is not filled

URI handler text form
image

URI handler QR form
image

Info
Suite: web 21.10.0 f14989d develop
Browser: Chrome Version 94.0.4606.61 (Official Build) (64-bit)
Device: TT 2.4.2 public regular
OS: Windows 10
URI handler used: bitcoin:bc1qdf7yc02r7gxle4kn98ds5rc5pq2nutpxw54rlw?amount=0.00010484

video: https://watch.screencastify.com/v/trybQcsTp87hmW3hH6IL

2. Mozzila WEB - OK
info: 92.0 (64 bitů) a
Opening handler results in browser asking where to open it (yay!)

Opening web Suite results in dialog (yay!) and adding the site into opening options (yay!)
image
image

Removing sites/settings from Firefox results in a dialogue when site is visited again with option to add the site to settings. When site is removed from handler settings, it does not appear in pop up.
image

3. Chrome WEB Removing sites/settings from chrome://settings/handlers results in being unable to open the handler with the site (OK). Removed site displays a special icon on the far right side of URL bar, clicking on it opens a dialogue about adding site to URI handler settings (OK).

@STew790
Copy link
Contributor

STew790 commented Oct 13, 2021

QA OK

I tried this on Linux and it works as intended in FF (93.0) as well as in Chorme. It is the same as @wendys-cats described. When I first open Suite it correctly asks if I want to add it as a Bitcoin URI handler. If I open any BTC URI link, it opens Suite and a pop-up tells me to go to Suite send form and then it fills up the send from with the info correctly (screenshot below).

Info:

  • Suite version: web 21.10.1 (aa3adfa)
  • Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
  • OS: Linux x86_64
  • Screen: 1920x1080
  • Device: model T 2.4.2 regular

Screenshot

  1. Click on "open in wallet"
    image
  2. Pop-up tells me to go to my account
    image
  3. When I go to my account and to send form, the pop-up shows the "Auto-fill in the form" button
    image
  4. When I click it, it correctly fills in the send form and I can send the tx
    image

@wendys-cats
Copy link
Contributor

wendys-cats commented Oct 13, 2021

QA OK

Windows 10
Protocol handler bitcoin: is defaultly set to open in Chrome.
Chrome web - removing/adding settings OK. Opening when site is added OK, not opening when there is no default OK. Suite/Wallet asking for permission OK.
Chrome+app - Chrome opens handler in web. If no default is set, handler is not opened (even if app is open). Needs to be re-set in Win system, but only through Microsoft Store (bleh).
image

Opening handler without an amount set - OK

Firefox web - removing/adding settings OK. Opening when site is added OK, not opening when there is no default OK. Suite/Wallet asking for permission OK.
Firefox+app - works OK. Also, Firefox can be set to open the handler with another app (even Chrome).

image
Opening handler without an amount set - OK

MacOS Big Sur
Protocol handler bitcoin: is defaultly set to open in app (if available).
App - once the app is opened, it will be set as a default. Needs to be reset via terminal.

Opening handler without an amount set - OK

Additional info:
Chrome - protocol settings chrome://settings/handlers
Firefox - protocol settings about:preferences#general

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants