Page MenuHomePhabricator

[Cashtab] [Simplify wallet structure p5] Remove function specific variable name change
ClosedPublic

Authored by bytesofman on Nov 28 2022, 04:56.

Details

Summary

T2663

Depends on D12625

There is a case to be made for renaming slpUtxos and nonSlpUtxos to tokenUtxos and xecUtxos everywhere, but in this case I think it's better to stick to the original syntax. At any rate, we should be consistent about the name everywhere in the app.

Test Plan

Confirm diff is changing variable names
Confirm I didn't mix them up and that tokenUtxos became slpUtxos, and xecUtxos became nonSlpUtxos
npm test
npm start, send a token tx, burn a token

Diff Detail

Repository
rABC Bitcoin ABC
Branch
streamline-wallet-structure
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21200
Build 42052: Build Diffcashtab-tests
Build 42051: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Nov 28 2022, 23:28

Failed tests logs:

====== CashTab Unit Tests: useBCH hook Throws error attempting to burn an eToken ID that is not within the wallet's utxo ======
Error: expect(received).toStrictEqual(expected) // deep equality

Expected: [Error: No token UTXOs for the specified token could be found.]
Received: [TypeError: Cannot destructure property 'tokenId' of 'undefined' as it is undefined.]
    at Object.<anonymous> (/work/web/cashtab/src/hooks/__tests__/useBCH.test.js:211:29)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)

Each failure log is accessible here:
CashTab Unit Tests: useBCH hook Throws error attempting to burn an eToken ID that is not within the wallet's utxo