HomePhabricator

[e.cash] Prevent navbar api calls on every page load

Description

[e.cash] Prevent navbar api calls on every page load

Summary:
I noticed the API call for the navbar price display was getting fired on every page load. You can see it happen as the price in the navbar will disappear for a moment when you change pages.

By moving this call to a context provider and passing it through the top app level, we can expose it to the navbar without inefficient api calls.

Test Plan:
preview the site and check everything still looks and functions the same, but you should only see the price call happen once, and the numbers wont disappear for a second when you change pages

Note: if you are running locally you'll probably see the call fired twice while in dev mode due to "strict-mode" being on in dev mode

Reviewers: #bitcoin_abc, Mengerian

Reviewed By: #bitcoin_abc, Mengerian

Subscribers: Mengerian

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

Details

Provenance
johnkuneyAuthored on Apr 5 2024, 21:13
johnkuneyPushed on Apr 5 2024, 21:13
Reviewer
Restricted Project
Differential Revision
D15892: [e.cash] Prevent navbar api calls on every page load
Parents
rABCe6d49c9dae4f: [electrum] push notification for release 5.2.12
Branches
Unknown
Tags
Unknown