HomePhabricator

[Cashtab] Move webapp specific functions to conditionally loaded component

Description

[Cashtab] Move webapp specific functions to conditionally loaded component

Summary:
Big goal here is to have only one App.js file to maintain. We want this file to build the Extension app if an extension env var is set, and the webapp if not.

In this diff, move webapp-specific logic into its own component, WebApp.js. Conditionally include this component at build time if you are not building the extension.

Test Plan:
Change monitorExtension boolean to true in src/config/app.js. npm start and note your extension intallation status in the dev console.
npm run build, then netlify deploy to a new URL. Load the URL. Confirm you get a request to enable notifications. Confirm persistent storage status in the log.

Reviewing code, confirm that WebApp.js is just copy pasted of what is removed from App.js

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

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

Details

Provenance
bytesofmanAuthored on Dec 14 2023, 23:37
bytesofmanPushed on Dec 21 2023, 17:14
Reviewer
Restricted Project
Differential Revision
D14989: [Cashtab] Move webapp specific functions to conditionally loaded component
Parents
rABC6ee8299d3d13: [kernel 1/n] Introduce initial libbitcoinkernel
Branches
Unknown
Tags
Unknown