HomePhabricator

[Cashtab] Create new getBalanceSats function in wallet dir

Description

[Cashtab] Create new getBalanceSats function in wallet dir

Summary:
Introduce new function getBalanceSats which gets the total balance in satoshis from an array of chronik utxos

This is part of a broader effort to reduce technical debt in Cashtab. This is step 1 of a series of diffs to combine <BalanceHeader>, <BalanceHeaderFiat>, <ZeroBalanceHeader> components into one standardized component that also shows distinction between spendable balance and total balance.

Looking to replace getWalletBalanceFromUtxos function from cashMethods. However, a number of new functions and refactors need to happen to achieve this goal.

Test Plan: npm test

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
bytesofmanAuthored on Jan 17 2024, 05:10
bytesofmanPushed on Jan 17 2024, 17:11
Reviewer
Restricted Project
Differential Revision
D15186: [Cashtab] Create new getBalanceSats function in wallet dir
Parents
rABC1121eb40f1bf: [Cashtab] Better conditions for disabling amount in SendXec
Branches
Unknown
Tags
Unknown