HomePhabricator

[Cashtab] [extension address passing p10] Add a prompt for the user to approve…

Description

[Cashtab] [extension address passing p10] Add a prompt for the user to approve or deny the address request

Summary:
T2550

Depends on D12323

Instead of automatically passing the address when a web page requests, first open the extension as a pop-up and prompt the user for approval.

Two reasons to do this.

  1. Some users may not wish to share their address with some web pages
  2. This makes sure the extension opens (and saves address to extension storage) even if the user is running the latest version for the first time, preventing the previous 'undefined' error

Test Plan:

cd web/cashtab
npm run extension
cd web/cashtab-components
npm run storybook

Navigate to brave://extensions and click Update
Click 'Get Address' in the GetAddress component. A popup should appear in top right of screen. It should tell you the origin of the requesting page.
Click "OK" and note that the address is populated.
Click 'Get Address' again. Click "Cancel" and note the address is populated by "Address request denied by user.'

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

Differential Revision: https://reviews.bitcoinabc.org/D12356

Details

Provenance
bytesofmanAuthored on Oct 21 2022, 17:51
bytesofmanPushed on Oct 27 2022, 17:10
Reviewer
Restricted Project
Differential Revision
D12356: [Cashtab] [extension address passing p10] Add a prompt for the user to approve or deny the address request
Parents
rABCd8595c6816a9: [Cashtab] [extension address passing p9] Display the received address in the…
Branches
Unknown
Tags
Unknown