Page MenuHomePhabricator

[Cashtab] Check if user has browser extension installed
ClosedPublic

Authored by bytesofman on Sep 13 2023, 17:48.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABCfa3a71769bb2: [Cashtab] Check if user has browser extension installed
Summary

T3283

If new monitorExtension flag is set, check if user has Cashtab browser extension installed. Print this info to the console.

Note: will build this out behind a feature flag as there are a few things we want to handle before we start showing popups to our users (see task).

Test Plan

npm test

Change monitorExtension to true
npm start and view dev console. Should print your extension installation status.
Disable the extension or install the extension and refresh the page --> see opposite status

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emack requested changes to this revision.Sep 14 2023, 02:48
emack added a subscriber: emack.

image.png (310×1 px, 30 KB)

I think this needs to distinguish between not installed vs installed but turned off in browser extensions. At the moment both are showing as 'Not installed' in the console log but you may want to have a different message advising the user their extension is installed and just needs to be turned on.

This revision now requires changes to proceed.Sep 14 2023, 02:48

image.png (310×1 px, 30 KB)

I think this needs to distinguish between not installed vs installed but turned off in browser extensions. At the moment both are showing as 'Not installed' in the console log but you may want to have a different message advising the user their extension is installed and just needs to be turned on.

I'm not sure we can do this (i.e. I do not think the information "what browser extensions has the user installed but disabled" is available to a given webpage). Some quick googling, looks like there are some hacky alternative methods of seeing if certain extension IDs are present -- however, same issue if the user has disabled it.

As far as we are concerned, a user savvy enough to have the extension but have it intentionally disabled will understand what's going on here. Going forward, we won't show the popup 100% of the time to such users anyway.

This revision is now accepted and ready to land.Sep 14 2023, 22:17