Page MenuHomePhabricator

[Cashtab Extension] New API to share contacts with external web apps
Changes PlannedPublic

Authored by emack on Mar 31 2024, 12:36.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Summary

Adds a new API for web apps to request the sharing of the extension's contact list to avoid having to maintain duplicate lists. This is a read-only sharing of non-sensitive data.

If the web app user wants to update the contact list, they still need to do it inside the extension so it remains the single source of truth. It was not worth expanding this to enable editing of contacts from outside of extension as the security considerations and implementation ROI was not worth it.

Test Plan
  • npm run extension
  • update browser with the local extension build from previous step
  • open up eCash Chat (see email for link), login via extension
  • scroll down and click the temporary get contact list from Cashtab button

image.png (298×351 px, 11 KB)

  • approve this request in extension and observe the successful rendering of contacts in the web app

image.png (298×450 px, 25 KB)

Diff Detail

Repository
rABC Bitcoin ABC
Branch
exportContacts
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28214
Build 55973: Build Diffcashtab-tests
Build 55972: arc lint + arc unit

Event Timeline

emack requested review of this revision.Mar 31 2024, 12:36

this follows the API for how cashtab handles address sharing.

however, that API is bad and should be different.

we need to get the extension off localforage and onto the extension storage api before we consider adding more passing options.

for now, i think it's ok to just have a different list in the webapp. the cashtab contact lists feature is already insanely overengineered compared to its impact.

This revision now requires changes to proceed.Mar 31 2024, 13:20
emack planned changes to this revision.Mar 31 2024, 13:27