Page MenuHomePhabricator

[Cashtab] [extension address passing p7] Actually fetch the address from storage in the background.js function
ClosedPublic

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

Details

Summary

T2550

Depends on D12319

In background.js, get the requested address from the extension storage API

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

Navigate to brave://extensions. Click 'update' and click 'Inpsect views in background page'

Click 'Get Address' in your storybook tab. In the background.js dev console, confirm the active wallet address appears i.e. background.js fetched address from extension storage, <yourAddress>
Change the active extension wallet and try again. Confirm the new address appears in the background.js dev log

Note: if a user has not yet opened the latest version of the extension that saves this address, then it will be undefined. This is expected behavior.

Diff Detail