Page MenuHomePhabricator

[Cashtab + libraries] ecashjs-lib to 1.0.3 and Cashtab to latest
ClosedPublic

Authored by bytesofman on Dec 14 2022, 19:28.

Details

Summary

T2847

ecashjs-lib was updated to have the latest dependencies installed, but references to the old ones were not corrected. This is corrected here.

This latest version of ecashjs-lib is also installed in Cashtab, so the code here can be tested.

Test Plan
cd web/ecashjs-lib
grep -r @psf .

Only output is CHANGELOG.md

cd web/cashtab
npm start

Send an XEC tx
Send an eToken tx
Send an XEC tx with an OP_RETURN msg

Diff Detail

Repository
rABC Bitcoin ABC
Branch
ecashjs-lib-to-103
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 21595
Build 42831: Build Diffcashtab-tests
Build 42830: arc lint + arc unit

Event Timeline

Removing local artifacts from package-lock.json from testing of ecashlib-js locally

Failed tests logs:

====== CashTab Unit Tests:  Wallet with BCH balances and tokens and state field ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet with BCH balances and tokens and state field 1`

- Snapshot  - 2
+ Received  + 2

@@ -54,11 +54,11 @@
                          className="ant-input-wrapper ant-input-group"
                        >
                          <span
                            className="ant-input-affix-wrapper"
                            hidden={null}
-                           onMouseDown={[Function]}
+                           onClick={[Function]}
                            style={null}
                          >
                            <span
                              className="ant-input-prefix"
                            >
@@ -161,11 +161,11 @@
                          className="ant-input-wrapper ant-input-group"
                        >
                          <span
                            className="ant-input-affix-wrapper"
                            hidden={null}
-                           onMouseDown={[Function]}
+                           onClick={[Function]}
                            style={null}
                          >
                            <span
                              className="ant-input-prefix"
                            />
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/SendToken.test.js:66:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet with BCH balances and tokens and state field 1`

- Snapshot  - 2
+ Received  + 2

@@ -162,11 +162,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -270,11 +270,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:88:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
====== CashTab Unit Tests:  Wallet without BCH balance ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet without BCH balance 1`

- Snapshot  - 2
+ Received  + 2

@@ -157,11 +157,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -265,11 +265,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:44:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
====== CashTab Unit Tests:  Wallet with BCH balances ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet with BCH balances 1`

- Snapshot  - 2
+ Received  + 2

@@ -157,11 +157,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -265,11 +265,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:58:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
====== CashTab Unit Tests:  Wallet with BCH balances and tokens ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Wallet with BCH balances and tokens 1`

- Snapshot  - 2
+ Received  + 2

@@ -157,11 +157,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -265,11 +265,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:72:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)
====== CashTab Unit Tests:  Without wallet defined ======
Error: expect(received).toMatchSnapshot()

Snapshot name: `Without wallet defined 1`

- Snapshot  - 2
+ Received  + 2

@@ -152,11 +152,11 @@
                                  className="ant-input-wrapper ant-input-group"
                                >
                                  <span
                                    className="ant-input-affix-wrapper"
                                    hidden={null}
-                                   onMouseDown={[Function]}
+                                   onClick={[Function]}
                                    style={null}
                                  >
                                    <span
                                      className="ant-input-prefix"
                                    >
@@ -260,11 +260,11 @@
                              <span
                                className="ant-input-group ant-input-group-compact"
                              >
                                <span
                                  className="ant-input-affix-wrapper"
-                                 onMouseDown={[Function]}
+                                 onClick={[Function]}
                                  style={
                                    Object {
                                      "textAlign": "left",
                                      "width": "60%",
                                    }
    at Object.<anonymous> (/work/web/cashtab/src/components/Send/__tests__/Send.test.js:107:18)
    at Promise.then.completed (/work/web/cashtab/node_modules/jest-circus/build/utils.js:391:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/work/web/cashtab/node_modules/jest-circus/build/utils.js:316:10)
    at _callCircusTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:218:40)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at _runTest (/work/web/cashtab/node_modules/jest-circus/build/run.js:155:3)
    at _runTestsForDescribeBlock (/work/web/cashtab/node_modules/jest-circus/build/run.js:66:9)
    at run (/work/web/cashtab/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:170:21)
    at jestAdapter (/work/web/cashtab/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:82:19)
    at runTestInternal (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:389:16)
    at runTest (/work/web/cashtab/node_modules/jest-runner/build/runTest.js:475:34)
    at Object.worker (/work/web/cashtab/node_modules/jest-runner/build/testWorker.js:133:12)

Each failure log is accessible here:
CashTab Unit Tests: Wallet with BCH balances and tokens and state field
CashTab Unit Tests: Wallet without BCH balance
CashTab Unit Tests: Wallet with BCH balances
CashTab Unit Tests: Wallet with BCH balances and tokens
CashTab Unit Tests: Without wallet defined

Updating snapshots, changing how ecashjs-lib is imported and called to remove 'Bitcoin'

This revision is now accepted and ready to land.Dec 15 2022, 07:22