Skip to content

Conversation

wa0x6e
Copy link
Contributor

@wa0x6e wa0x6e commented May 20, 2025

Toward https://github.com/snapshot-labs/workflow/issues/562

This PR allows starknet addresses when calling get_vp, validate and getScores

@wa0x6e wa0x6e requested review from Copilot and bonustrack May 20, 2025 08:41
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR extends address validation to include Starknet addresses in utility functions.

  • Updated isValidAddress to accept Starknet addresses via isStarknetAddress.
  • Ensured empty-address exclusion remains in place.
Comments suppressed due to low confidence (2)

src/utils.ts:796

  • Update the JSDoc or comments for isValidAddress to indicate that it now also supports Starknet addresses.
function isValidAddress(address: string) {

src/utils.ts:798

  • Add unit tests to cover the new Starknet address validation path in isValidAddress to ensure correct behavior.
(isAddress(address) || isStarknetAddress(address)) &&

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@wa0x6e wa0x6e merged commit 28d42d2 into master May 20, 2025
4 checks passed
@wa0x6e wa0x6e deleted the feat-accept-starknet-address-for-vp-and-validation branch May 20, 2025 11:09
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