Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checksum safeAddress of collectibles fetching and propagate type #1568

Merged
merged 1 commit into from
May 24, 2024

Conversation

iamacook
Copy link
Member

Summary

In order to maintain a strict type and checksummed address throughout the project, we should validate the incoming addresses. In newer controllers, we started doing this by adding an AddressSchema to address. This begins adding it to "existing" controllers.

This checksums the incoming safeAddress of BalancesController['getCollectibles'] and propagates the stricter (0x${string}) type throughout the project accordingly

Changes

  • Add validation pipe checksum to incoming safeAddress of BalancesController['getCollectibles']
  • Update safeAddress argument of BalancesService['getCollectibles | clearCollectibles']
  • Update safeAddress argument type of IBalancesRepository['getCollectibles | clearCollectibles'] and all implementor
  • Update safeAddress argument type of IBalancesApi['getCollectibles'] and all implementors (Safe/Zerion)
  • Update safeAddress type of Safe/Zerion balance cache
  • Update types/tests accordingly

@iamacook iamacook requested a review from a team as a code owner May 17, 2024 16:06
@iamacook iamacook self-assigned this May 17, 2024
@iamacook iamacook merged commit 4dbdcc5 into main May 24, 2024
16 checks passed
@iamacook iamacook deleted the checksum-get-collectibles branch May 24, 2024 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants