Page MenuHomePhabricator

[Cashtab] Replace web hosted pkg with npm module
ClosedPublic

Authored by bytesofman on May 28 2021, 16:19.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC97197f19af5a: [Cashtab] Replace web hosted pkg with npm module
Summary

Remove minimal-slp-wallet from web hosting and replace with npm module (app previously worked this way; extension still works this way).

Following D9568 and the significantly reduced bundle size, the impact of adding this to the bundle vs web hosting is dramatically reduced (since it is now minimized).

Web hosted: 320kb bundle and 318kb web hosted module, 638kb total
Installed pkg: 686kb bundle (slightly larger, load time is not appreciably different)

In my judgment the additional simplification of keeping the extension and the webapp on the same dependency tree for now is worth the slight increase in bundle size.

Test Plan
docker build -t cashtab_local .
docker run --rm -p 8080:80 --name cashtab cashtab_local
  1. Navigate to localhost:8080 in browser and check web console
  2. Go to "Network" tab of web console
  3. Hard refresh the page and confirm bundle size < 700kb
  4. Send a BCHA tx
  5. Send an SLPA tx

Diff Detail

Repository
rABC Bitcoin ABC
Branch
remove-web-hosted-pkg
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15849
Build 31598: Build Diffcashtab-tests
Build 31597: arc lint + arc unit