[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.
- Some users may not wish to share their address with some web pages
- 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