Page MenuHomePhabricator

[Cashtab] [extension address passing p6] Extension runs an address fetch function when requested to do so
ClosedPublic

Authored by bytesofman on Oct 19 2022, 18:11.

Details

Summary

T2550

Depends on D12318

Update GetAddress.tsx so that handleGetAddress sends an address request to the browser extension.
Updage background.js in the browser extension so that it recognizes this request and runs this function.

Test Plan

In one terminal,

cd web/cashtab-components
npm run storybook

In an other terminal,

cd web/cashtab
npm run extension

Navigate to brave://extension and click 'update'
Click 'inspect views in background page'
This will open a small window with a dev console

In your local storybook, click on the 'Get Address' button in the GetAddress component
Note that the dev console for background.js reads "User is requesting extension address" and "fetchAddress called in background.js'

Event Timeline

emack requested changes to this revision.Oct 20 2022, 12:58
emack added a subscriber: emack.

I'm not seeing this firing anything in the extension console on chrome. Am I looking in the right place?

This revision now requires changes to proceed.Oct 20 2022, 12:58

I'm not seeing this firing anything in the extension console on chrome. Am I looking in the right place?

image.png (234×421 px, 21 KB)

You need to "Inspect views background page"

This revision is now accepted and ready to land.Oct 25 2022, 03:14