Convert Token screen to ts as prep for refactor to improve extensability to other token types.
Implement ts in deps important to this conversion, like validation, and its deps.
Differential D17154
[Cashtab] Convert Token, validation, and other deps to ts bytesofman on Sat, Nov 16, 15:25. Authored by Tags None Subscribers None
Details
Convert Token screen to ts as prep for refactor to improve extensability to other token types. Implement ts in deps important to this conversion, like validation, and its deps. npm test
Diff Detail
Event TimelineComment Actions Build Bitcoin ABC Diffs / Diff Testing (cashtab-tests) failed.
Tail of the build log: 1 moderate severity vulnerability To address all issues, run: npm audit fix Run `npm audit` for details. > ecash-lib@0.2.1 build > tsc && tsc -p ./tsconfig.build.json && cp -r ./src/ffi ./dist Installing ecash-agora dependencies... /work/modules/ecash-agora /work/modules/ecash-lib /work/modules/ecash-lib-wasm /work/modules/ecash-script /work/modules/chronik-client /work/modules/mock-chronik-client /work/modules/ecashaddrjs /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 1 moderate severity vulnerability To address all issues, run: npm audit fix Run `npm audit` for details. > ecash-agora@0.1.1 build > tsc && tsc -p ./tsconfig.build.json /work/cashtab /work/modules/ecash-agora /work/modules/ecash-lib /work/modules/ecash-lib-wasm /work/modules/ecash-script /work/modules/chronik-client /work/modules/mock-chronik-client /work/modules/ecashaddrjs /work/abc-ci-builds/cashtab-tests added 1483 packages, and audited 3329 packages in 25s 323 packages are looking for funding run `npm fund` for details 3 vulnerabilities (2 moderate, 1 high) To address all issues, run: npm audit fix Run `npm audit` for details. > cashtab@2.54.0 build > node scripts/build.js Creating an optimized production build... Failed to compile. TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. [0m [90m 299 |[39m [90m// Check if the user has mint batons for this token[39m [90m 300 |[39m [90m// If they don't, disable the mint switch and label why[39m [31m[1m>[22m[39m[90m 301 |[39m [36mconst[39m mintBatons [33m=[39m getMintBatons(wallet[33m.[39mstate[33m.[39mslpUtxos[33m,[39m tokenId)[33m;[39m [90m |[39m [31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m[31m[1m^[22m[39m [90m 302 |[39m [90m 303 |[39m [90m// Load with QR code open if device is mobile[39m [90m 304 |[39m [36mconst[39m openWithScanner [33m=[39m[0m Build cashtab-tests failed with exit code 1 |