HomePhabricator

[Cashtab] Replace web hosted pkg with npm module

Description

[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

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D9604

Details

Provenance
Joey King <joseph.roy.king@gmail.com>Authored on May 28 2021, 16:15
bytesofmanPushed on May 28 2021, 21:14
Reviewer
Restricted Project
Differential Revision
D9604: [Cashtab] Replace web hosted pkg with npm module
Parents
rABCb789fff5c597: [refactor] get ValueFromAmount via an implicit Amount::operator UniValue()
Branches
Unknown
Tags
Unknown