Page MenuHomePhabricator

[ecash-herald] Implement typescript
ClosedPublic

Authored by bytesofman on Nov 1 2024, 21:34.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC5bdba03f6cbc: [ecash-herald] Implement typescript
Summary

Convert ecash-herald to typescript

There was not a clear path to doing this incrementally so just did it all. It's messy. Uncovered some bugs that had to be fixed in line with this diff.

Assurance of consistent app performance with passing tests. Will be much easier to work with going forward.

Test Plan

npm test

There's really no way to review this diff.

But, the tests confirm that mocks are the same (only change being a bugfix where tokenDocumentUrl was coming in undefined, since it's url in post-nng chronik).

I also have this version running in the Herald Dev channel as of block 869,177 -- so you can confirm expected behavior there.

the options were basically mothball herald and write a new app in typescript or convert it all in one go.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
herald-ts
Lint
Lint Errors
SeverityLocationCodeMessage
Errorapps/ecash-herald/.eslintrc.js:1ESLINT@typescript-eslint/semi
Errorapps/ecash-herald/.eslintrc.js:5ESLINTstrict
Errorapps/ecash-herald/test/mocks/block.legacy.js:1ESLINT@typescript-eslint/semi
Errorapps/ecash-herald/test/mocks/block.legacy.js:5ESLINTstrict
Unit
No Test Coverage
Build Status
Buildable 30962
Build 61427: Build Diffecash-script-tests · ecash-herald-tests
Build 61426: arc lint + arc unit

Event Timeline

finish converting scripts to ts, deprecate legacy script, update readme, update gitignore, fix cron import for ts

remove no longer needed ts-ignore

remove secrets (ok burn as its just dev and testing info)

bytesofman published this revision for review.Nov 1 2024, 22:48
bytesofman added inline comments.
apps/ecash-herald/scripts/generateMock.ts
210 ↗(On Diff #50609)

bug fix, waitForFinalizationMsecs doesn't exist anymore

apps/ecash-herald/scripts/sendMsgByBlock.ts
68 ↗(On Diff #50609)

bugfix, waitForFinalizationMsecs does not exist anymore

This revision is now accepted and ready to land.Nov 3 2024, 11:03
This revision was automatically updated to reflect the committed changes.