Page MenuHomePhabricator

[Cashtab] Convert Home screen to typescript
ClosedPublic

Authored by bytesofman on Sat, Dec 14, 05:02.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC9b4c6905cbae: [Cashtab] Convert Home screen to typescript
Summary

Working on a broader refactor to how TX history is loaded and parsed, will help to have the parent component in ts

Part of a wider effort to gradually convert all of Cashtab to typescript

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
home-to-tsx
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31665
Build 62826: Build Diffcashtab-tests
Build 62825: arc lint + arc unit

Event Timeline

emack requested changes to this revision.Sun, Dec 15, 21:07
emack added a subscriber: emack.
emack added inline comments.
cashtab/src/components/Home/Home.tsx
104–107 ↗(On Diff #51587)

what's the purpose if this is just checking for the presence of a local env key instead of the key value itself? Anyone can set any value here

This revision now requires changes to proceed.Sun, Dec 15, 21:07
cashtab/src/components/Home/Home.tsx
104–107 ↗(On Diff #51587)

it's a typescript type safety issue here

we can't validate whether or not this env variable is correct at build time, only the recaptcha servers can do this. But for the purposes of the function, we do have to ensure it is not undefined (because the load function below cannot accept undefined).

we could confirm it is a string but all env vars are string.

This revision is now accepted and ready to land.Mon, Dec 16, 00:27