Page MenuHomePhabricator

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

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

Details

Reviewers
None
Group Reviewers
Restricted Project
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
Branch
use-available-sk-pk
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31283
Build 62064: Build Diffcashtab-tests
Build 62063: arc lint + arc unit

Event Timeline

bytesofman added inline comments.
cashtab/src/components/Nfts/fixtures/mocks.ts
374

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

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

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