Page MenuHomePhabricator

[Cashtab] Convert WalletLabel to ts
ClosedPublic

Authored by bytesofman on Fri, Jan 17, 02:14.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABCf424953ba614: [Cashtab] Convert WalletLabel to ts
Summary

Convert this component to ts as prep for upgrading the behavior of wallet switching

Test Plan

npm test

Diff Detail

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

Event Timeline

Tail of the build log:

Run `npm audit` for details.

> ecash-lib@1.3.0 build
> tsc && tsc -p ./tsconfig.build.json && cp -r ./src/ffi ./dist

/work/modules/ecash-agora /work/abc-ci-builds/cashtab-tests

added 364 packages, and audited 367 packages in 2s

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

2 vulnerabilities (1 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-agora@0.3.1 build
> tsc && tsc -p ./tsconfig.build.json

/work/cashtab /work/abc-ci-builds/cashtab-tests
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated eslint@8.56.0: This version is no longer supported. Please see https://eslint.org/version-support for other options.

added 1494 packages, and audited 3315 packages in 25s

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

8 vulnerabilities (6 moderate, 2 high)

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@3.12.2 build
> node scripts/build.js

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

TS2339: Property 'setCashtabState' does not exist on type 'UseWalletReturnType'.
    86 |     const {
    87 |         cashtabState,
  > 88 |         setCashtabState,
       |         ^^^^^^^^^^^^^^^
    89 |         updateCashtabState,
    90 |         fiatPrice,
    91 |         loading,


Build cashtab-tests failed with exit code 1

Tail of the build log:

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

2 vulnerabilities (1 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-lib@1.3.0 build
> tsc && tsc -p ./tsconfig.build.json && cp -r ./src/ffi ./dist

/work/modules/ecash-agora /work/abc-ci-builds/cashtab-tests

added 364 packages, and audited 367 packages in 2s

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

2 vulnerabilities (1 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-agora@0.3.1 build
> tsc && tsc -p ./tsconfig.build.json

/work/cashtab /work/abc-ci-builds/cashtab-tests
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated eslint@8.56.0: This version is no longer supported. Please see https://eslint.org/version-support for other options.

added 1494 packages, and audited 3315 packages in 25s

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

8 vulnerabilities (6 moderate, 2 high)

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@3.12.2 build
> node scripts/build.js

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

Module not found: Error: Can't resolve 'components/Common/WalletLabel.js' in '/work/cashtab/src/components/App'


Build cashtab-tests failed with exit code 1

fix import, remove now-unused-prop that ts catches

Tail of the build log:

Run `npm audit` for details.

> ecash-lib@1.3.0 build
> tsc && tsc -p ./tsconfig.build.json && cp -r ./src/ffi ./dist

/work/modules/ecash-agora /work/abc-ci-builds/cashtab-tests

added 364 packages, and audited 367 packages in 1s

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

2 vulnerabilities (1 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

> ecash-agora@0.3.1 build
> tsc && tsc -p ./tsconfig.build.json

/work/cashtab /work/abc-ci-builds/cashtab-tests
npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated eslint@8.56.0: This version is no longer supported. Please see https://eslint.org/version-support for other options.

added 1494 packages, and audited 3315 packages in 24s

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

8 vulnerabilities (6 moderate, 2 high)

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@3.12.2 build
> node scripts/build.js

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

TS7006: Parameter 'e' implicitly has an 'any' type.
    80 |     const address = wallets[0].paths.get(1899).address;
    81 |
  > 82 |     const handleSelectWallet = e => {
       |                                ^
    83 |         const walletName = e.target.value;
    84 |
    85 |         // Get the active wallet by name


Build cashtab-tests failed with exit code 1
bytesofman added inline comments.
cashtab/src/components/App/App.tsx
183 ↗(On Diff #52259)

this component stopped using this prop a long time ago, but without typescript nothing complained

This revision is now accepted and ready to land.Fri, Jan 17, 08:07
This revision was automatically updated to reflect the committed changes.