Skip to content

Conversation

@LufyCZ
Copy link
Contributor

@LufyCZ LufyCZ commented Feb 9, 2025

What changed? Why?

  • ViemWalletProvider was heavily cleaned up, type-wise. ReadContract function now behaves as expected, SignTypedData is now typed, etc.
  • CdpWalletProvider and the parent class EvmWalletProvider have received similar improvements.
  • 0x${string} has been replaced with Address and Hex approprietly.
  • The Network type has been tightened down considerably, including the chain and network id maps
  • Instead of regexes, address checks in zod schemas now use the isAddress function from viem

This PR ensures that the repo is taking advantage of TypeScript a lot more. Many anys and many as type assertions have been removed.

Qualified Impact

  • Possible impact on open, but not-yet-merged PRs
  • I have tried keeping runtime changes to a minimum, but some were unavoidable. However, tests run, and the repo builds. I have done basic runtime testing as well.
  • There should be no "dangerous" impact

@cb-heimdall
Copy link

cb-heimdall commented Feb 9, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@LufyCZ LufyCZ force-pushed the feature/type-cleanup branch from d572ac5 to 286b1d8 Compare February 9, 2025 01:50
@LufyCZ LufyCZ marked this pull request as ready for review February 9, 2025 01:57
@0xRAG 0xRAG added enhancement New feature or request needs review PR / issue needs review banana typescript labels Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

banana enhancement New feature or request needs review PR / issue needs review typescript

Development

Successfully merging this pull request may close these issues.

3 participants