HomePhabricator

[Cashtab] Standardize use of Promise.all in useBCH.js

Description

[Cashtab] Standardize use of Promise.all in useBCH.js

Summary:
T2105

useBCH.js has inconsistent implementation of Promise.all(). This is an artifact from Cashtab's original launch. Cashtab is either (1) calling await <some async function and then calling Promise.all, which isn't actually the intended behavior, or it is calling an async function without await and thus instantly calling a function (and then calling it again under Promise.all

This behavior "works" but is neither clean nor desirable.

This diff standardizes the use of Promise.all in all instances by wrapping the intended async function in a promise-return function. Variables are also renamed in a standard way.

Test Plan: npm start, send and receive txs, observe no change in app behavior

Reviewers: emack, #bitcoin_abc

Reviewed By: emack, #bitcoin_abc

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

Details

Provenance
Joey King <joseph.roy.king@gmail.com>Authored on Jan 6 2022, 14:05
bytesofmanPushed on Jan 21 2022, 15:09
Reviewer
Restricted Project
Differential Revision
D10775: [Cashtab] Standardize use of Promise.all in useBCH.js
Parents
rABCc8c860300711: test: Extend functional tests for addr relay
Branches
Unknown
Tags
Unknown