Page MenuHomePhabricator

[Cashtab] Initialize new chronik dir with parseChronikTx function
AbandonedPublicDraft

Authored by bytesofman on Jan 23 2024, 00:35.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Goal is to move chronik.js out of utils and improve formatting and organization of its functions and unit tests

Start with parseChronikTx as there are some additional tests and bugs to patch here.

This diff preserves the existing test cases with the existing mocks. It renames them and organizes them into a vectors array instead of a long list in the test file.

parseChronikTx is moved from src/utils/chronik to src/chronik/index.js

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
patch-tx-parsing-bug
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26571
Build 52712: Build Diffcashtab-tests
Build 52711: arc lint + arc unit

Event Timeline

Tail of the build log:

/work/cashtab /work/abc-ci-builds/cashtab-tests
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
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 rollup-plugin-terser@7.0.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-terser
npm WARN deprecated workbox-cacheable-response@6.6.0: workbox-background-sync@6.6.0
npm WARN deprecated text-encoding@0.6.4: no longer maintained
npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
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
npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.
npm WARN deprecated @babel/plugin-proposal-private-property-in-object@7.21.11: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.
npm WARN deprecated @babel/plugin-proposal-private-methods@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.
npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.
npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.
npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.

added 1937 packages, and audited 1938 packages in 23s

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

4 moderate severity vulnerabilities

To address issues that do not require attention, run:
  npm audit fix

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

Run `npm audit` for details.

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

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

[eslint] 
src/utils/chronik.js
  Line 4:5:     'parseOpReturn' is defined but never used           no-unused-vars
  Line 5:5:     'getHashArrayFromWallet' is defined but never used  no-unused-vars
  Line 9:22:    'opreturnConfig' is defined but never used          no-unused-vars
  Line 11:8:    'appConfig' is defined but never used               no-unused-vars
  Line 522:27:  'parseChronikTx' is not defined                     no-undef

Search for the keywords to learn more about each error.


Build cashtab-tests failed with exit code 1
bytesofman retitled this revision from [Cashtab] Better organization of chronik functions to [Cashtab] Initialize new chronik dir with parseChronikTx function.Jan 23 2024, 21:24
bytesofman edited the summary of this revision. (Show Details)

handled in another diff