Page MenuHomePhabricator

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

Authored by bytesofman on Jan 6 2022, 14:09.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABCb863921ed020: [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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable