Page MenuHomePhabricator

[Cashtab] Use available sk and pk rather than deriving from wif and ecc
ClosedPublic

Authored by bytesofman on Nov 22 2024, 18:21.

Details

Summary

Now that sk and pk are calculated on cashtab startup and saved with the wallet object, we do not have to derive sk from wif and pk from sk

Had to update some more missed legacy types in mocks to implement.

Test Plan

npm test

Diff Detail

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

Event Timeline

bytesofman added inline comments.
cashtab/src/components/Nfts/fixtures/mocks.ts
374 ↗(On Diff #51056)

this changes is not directly related to this diff, however

  • We want to convert this file to ts so that we confirm the mocks it contains have sk and pk as expected
  • converting to ts, we need to make everything in the file valid
1542 ↗(On Diff #51056)

not sure where this was originally used. it's not used by anything anymore.

removed due to ts lint issues.

cashtab/src/transactions/fixtures/vectors.js
325 ↗(On Diff #51056)

this was always a weird test

we were actually just showing that the wif library could not get the private key from a corrupt wif

now we don't use wif

This revision is now accepted and ready to land.Nov 23 2024, 01:16