chore: fix main TypeScript baseline#346
Conversation
aac04bd to
d70603a
Compare
brh28
left a comment
There was a problem hiding this comment.
the tests in tests/galoy are unused. They were still lingering just as a reference to be migrated into tests/flash overtime. If there causing any issues, I'd be favor of just removing them
There was a problem hiding this comment.
strange file. I'm curious what this is used for
There was a problem hiding this comment.
no idea. kratos is still black-box-ish to me
There was a problem hiding this comment.
Removed this file. It was only referenced by the deleted Galoy e2e tests, so keeping it as a production-adjacent test helper was unnecessary.
| type AddInvoiceForSelfArgs = { | ||
| walletId: WalletId | ||
| amount: FractionalCentAmount // only supports USD for now | ||
| amount: number | FractionalCentAmount // only supports USD for now |
There was a problem hiding this comment.
typically don't want to be handling javascript number types
There was a problem hiding this comment.
whats a better way to fix the type check error here?
There was a problem hiding this comment.
Replaced the JS number compatibility amounts with branded domain types: FractionalCentAmount for USD invoice amounts and BtcPaymentAmount for BTC compatibility stubs. The remaining helper call sites now convert explicitly at the test boundary.
| checkOnchainMin, | ||
| ]) No newline at end of file | ||
| ]) | ||
| export const PaymentInputValidator = (getWalletFn: PaymentInputValidatorConfig) => ({ |
There was a problem hiding this comment.
Removed the unused legacy PaymentInputValidator export and its declaration types. Its only remaining consumers were in the deleted Galoy unit tests.
maybe we should just remove them all then... I'm in favor of it too. |
|
Addressed review feedback in
Verification: |
brh28
left a comment
There was a problem hiding this comment.
I'm going to update the commit message to chore: as the changes do change production code, even if minor
Summary
Fixes the current
mainTypeScript baseline by removing stale Galoy-only test suites and tightening the remaining Flash-facing types instead of keeping compatibility shims for unused tests.Highlights:
test/galoyexecutable test suites (bats,e2e,integration,legacy-integration,unit)test/galoy/helpers/mocksthat are still imported bytest/flashsrc/services/kratos/tests-but-not-prod.ts, which was only referenced by the removed Galoy e2e testsPaymentInputValidatorcompatibility export and related typesamount: numbercompatibility types with branded domain amounts (FractionalCentAmount/BtcPaymentAmount)Validation
Run with Node
20.20.0:yarn tsc-check-noimplicitany✅yarn tsc-check✅yarn build✅Note: local full
yarn eslint-checkfrom nested worktrees can be blocked by duplicate ESLint plugin resolution between the worktree and parent checkout; changed files pass ESLint with plugins resolved from this worktree.