Page MenuHomePhabricator

[Cashtab] split out backend functions from tests
ClosedPublic

Authored by bytesofman on Jan 19 2021, 17:45.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC4fbab12477a9: [Cashtab] split out backend functions from tests
Summary

The getSlpBalancesAndUtxos function from useBCH.js included an API request. This diff moves the API request to a separate function, getHydratedUtxoDetails. It also removes the test for getUtxos as this is a pure API call. Tests were failing because the utxos at the mock addresses had been spent. Mocks updated to a more complicated utxo set.

Test Plan

npm test

Diff Detail

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

Event Timeline

Fabien requested changes to this revision.Jan 19 2021, 18:43
Fabien added a subscriber: Fabien.
Fabien added inline comments.
web/cashtab/src/hooks/useWallet.js
190 ↗(On Diff #27089)

Remove

This revision now requires changes to proceed.Jan 19 2021, 18:43

Remove console.log statement per inline comments

This revision is now accepted and ready to land.Jan 19 2021, 19:17