Page MenuHomePhabricator

[Cashtab] [chronik utxo handling p8] Remove obsolete bch-api functions, unit tests, and mocks
ClosedPublic

Authored by bytesofman on Sep 13 2022, 00:08.

Details

Summary

T2447

Depends on D11966

RIP

Test Plan

npm test
npm start and nothing blows up

Diff Detail

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

Event Timeline

Tail of the build log:

npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss-pseudo-class-any-link@7.1.6',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss-selector-not@6.0.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated text-encoding@0.6.4: no longer maintained
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated ts-custom-error@2.2.2: npm package tarball contains useless codeclimate-reporter binary, please update to version 3.1.1. See https://github.com/adriengibrat/ts-custom-error/issues/32

> cashtab@1.0.0 prepare
> cd ../.. && husky install web/cashtab/.husky

husky - Git hooks installed

added 1832 packages, and audited 1833 packages in 27s

233 packages are looking for funding
  run `npm fund` for details

13 vulnerabilities (5 moderate, 8 high)

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
npm notice 
npm notice New major version of npm available! 7.7.6 -> 8.19.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.1>
npm notice Run `npm install -g npm@8.19.1` to update!
npm notice 

> cashtab@1.0.0 build
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

[eslint] 
src/hooks/useWallet.js
  Line 57:9:    'getUtxos' is assigned a value but never used                no-unused-vars
  Line 58:9:    'getHydratedUtxoDetails' is assigned a value but never used  no-unused-vars
  Line 59:9:    'getSlpBalancesAndUtxos' is assigned a value but never used  no-unused-vars
  Line 76:11:   'previousUtxos' is assigned a value but never used           no-unused-vars
  Line 146:11:  'haveUtxosChanged' is assigned a value but never used        no-unused-vars

Search for the keywords to learn more about each error.


Build cashtab-tests failed with exit code 1

Removing more mocks and functions and unit tests that are obsoleted by chronik

Tail of the build log:

npm WARN EBADENGINE   package: 'postcss-preset-env@7.8.0',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss-pseudo-class-any-link@7.1.6',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: 'postcss-selector-not@6.0.1',
npm WARN EBADENGINE   required: { node: '^12 || ^14 || >=16' },
npm WARN EBADENGINE   current: { node: 'v15.14.0', npm: '7.7.6' }
npm WARN EBADENGINE }
npm WARN deprecated stable@0.1.8: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated text-encoding@0.6.4: no longer maintained
npm WARN deprecated svgo@1.3.2: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated axios@0.19.2: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated ts-custom-error@2.2.2: npm package tarball contains useless codeclimate-reporter binary, please update to version 3.1.1. See https://github.com/adriengibrat/ts-custom-error/issues/32

> cashtab@1.0.0 prepare
> cd ../.. && husky install web/cashtab/.husky

husky - Git hooks installed

added 1832 packages, and audited 1833 packages in 26s

233 packages are looking for funding
  run `npm fund` for details

13 vulnerabilities (5 moderate, 8 high)

To address all issues possible (including breaking changes), run:
  npm audit fix --force

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
npm notice 
npm notice New major version of npm available! 7.7.6 -> 8.19.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.1>
npm notice Run `npm install -g npm@8.19.1` to update!
npm notice 

> cashtab@1.0.0 build
> node scripts/build.js

Creating an optimized production build...
Failed to compile.

[eslint] 
src/hooks/useWallet.js
  Line 24:8:   'isEqual' is defined but never used         no-unused-vars
  Line 59:31:  'utxos' is assigned a value but never used  no-unused-vars

Search for the keywords to learn more about each error.


Build cashtab-tests failed with exit code 1
emack requested changes to this revision.Sep 16 2022, 02:40
emack added a subscriber: emack.

Getting undefined buffer when sending outbound XEC txs in this patch. Have tried across several wallets. Potentially related to D11995?

image.png (852×920 px, 276 KB)

This revision now requires changes to proceed.Sep 16 2022, 02:40

Getting undefined buffer when sending outbound XEC txs in this patch. Have tried across several wallets. Potentially related to D11995?

image.png (852×920 px, 276 KB)

This is expected behavior as the parts of this stacked diff that address formatting of new utxos for transaction creation have not yet been addressed

sendXec is addressed in D11977, the next part

Based on comment above, regression tested ok based on inbound actions only:

  • receive standard XEC tx
  • receive XEC tx with unencrypted msg
  • receive XEC tx with encrypted msg
  • receive one to many XEC tx
  • receive one to many XEC tx with unencrypted msg
  • receive etoken tx
  • repeat above on a fresh new wallet (except encrypted inbound msg since there's no outgoing tx in history)
This revision is now accepted and ready to land.Sep 20 2022, 05:24