T2730
Depends on D12805
Delete the getRestUrl function
Delete all of its calls.
Some of its calls relate to error messages only known to exist in bch-api. In these cases, generalize the error msg.
Differential D12807
[Cashtab] [final countdown bch param p2] Delete getRestUrl function bytesofman on Dec 8 2022, 04:15. Authored by Tags None Subscribers None
Details
T2730 Depends on D12805 Delete the getRestUrl function Delete all of its calls. Some of its calls relate to error messages only known to exist in bch-api. In these cases, generalize the error msg. Review code and confirm deletions only relate to error notifications.
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (cashtab-tests) failed.
Tail of the build log: npm WARN EBADENGINE Unsupported engine { npm WARN EBADENGINE package: 'postcss-place@7.0.5', 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-preset-env@7.8.2', 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 } > cashtab@1.0.0 prepare > cd ../.. && husky install web/cashtab/.husky husky - Git hooks installed added 1813 packages, and audited 1814 packages in 40s 234 packages are looking for funding run `npm fund` for details 8 vulnerabilities (5 moderate, 2 high, 1 critical) 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. npm notice npm notice New major version of npm available! 7.7.6 -> 9.2.0 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.2.0> npm notice Run `npm install -g npm@9.2.0` to update! npm notice > cashtab@1.0.0 build > node scripts/build.js Creating an optimized production build... Failed to compile. [eslint] src/hooks/useBCH.js Line 2:8: 'SlpWallet' is defined but never used no-unused-vars Search for the keywords to learn more about each error. Build cashtab-tests failed with exit code 1 Comment Actions Build Bitcoin ABC Diffs / Diff Testing (cashtab-tests) failed.
Tail of the build log: tokenMethods.js | 100 | 100 | 100 | 100 | txBuilder.js | 63.88 | 42.85 | 50 | 65.71 | 11,43-53,69-72,89 validation.js | 92.89 | 80.98 | 84.61 | 93.18 | 22-23,79-86,123-130,234,280,330,342 src/utils/icons | 2.52 | 0 | 0 | 2.72 | cropImage.js | 2.27 | 0 | 0 | 2.43 | 2-78 resizeImage.js | 2.77 | 0 | 0 | 3.03 | 2-51 roundImage.js | 2.56 | 0 | 0 | 2.77 | 2-57 ---------------------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ##teamcity[blockOpened name='Code Coverage Summary'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='1793'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='4297'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='738'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='2056'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='307'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='964'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='1763'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='4192'] ##teamcity[blockClosed name='Code Coverage Summary'] Summary of all failing tests FAIL src/hooks/__tests__/migrations.test.js ● Test suite failed to run Cannot find module '@psf/bch-js' from 'src/hooks/__tests__/migrations.test.js' 1 | import { currency } from '../../components/Common/Ticker'; 2 | import BigNumber from 'bignumber.js'; > 3 | import BCHJS from '@psf/bch-js'; | ^ 4 | import { fromSatoshisToXec, fromXecToSatoshis } from 'utils/cashMethods'; 5 | 6 | describe('Testing functions for upgrading Cashtab', () => { at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11) at Object.<anonymous> (src/hooks/__tests__/migrations.test.js:3:1) FAIL src/utils/__tests__/cashMethods.test.js ● Test suite failed to run Cannot find module '@psf/bch-js' from 'src/utils/__tests__/cashMethods.test.js' 84 | 85 | import mockLegacyWallets from 'hooks/__mocks__/mockLegacyWallets'; > 86 | import BCHJS from '@psf/bch-js'; | ^ 87 | import sendBCHMock from '../../hooks/__mocks__/sendBCH'; 88 | import { 89 | activeWebsocketAlpha, at Resolver.resolveModule (node_modules/jest-resolve/build/resolver.js:324:11) at Object.<anonymous> (src/utils/__tests__/cashMethods.test.js:86:1) Test Suites: 2 failed, 19 passed, 21 total Tests: 267 passed, 267 total Snapshots: 37 passed, 37 total Time: 11.818 s Ran all test suites. Build cashtab-tests failed with exit code 1 |