Page MenuHomePhabricator

[Cashtab] Convert BackupWallet screen to ts
ClosedPublic

Authored by bytesofman on Dec 26 2024, 18:13.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa3cb3bd23735: [Cashtab] Convert BackupWallet screen to ts
Summary

Part of ongoing incremental upgrade of Cashtab to typescript

Test Plan

npm test, ts lint runs in CI

Diff Detail

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

Event Timeline

Fabien added inline comments.
cashtab/src/components/BackupWallet/BackupWallet.tsx
61 ↗(On Diff #51750)

I guess you always have a wallet if you're loading the backup screen ?

bytesofman added inline comments.
cashtab/src/components/BackupWallet/BackupWallet.tsx
61 ↗(On Diff #51750)

this matches the implementation we use on all the components converted to typescript

The App screen only renders <Onboarding/> component if we do not have a valid wallets[0]

So we can get rid of this check. Typescript is what lets us know this is true now.

The check against false is an artifact from the dev era before Cashtab had a wallet type and any screen could load for a user with no wallet.

This revision is now accepted and ready to land.Dec 27 2024, 15:25
This revision was automatically updated to reflect the committed changes.
bytesofman marked an inline comment as done.