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
Branch
cashtab-test-mock
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 14849
Build 29652: Build Diffcashtab-tests
Build 29651: arc lint + arc unit

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

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