Skip to content

fix(routes): remove unreachable MAX_ADDRESS_LENGTH check (#117) - #145

Open
ZacLou wants to merge 1 commit into
ourdao:mainfrom
ZacLou:fix/remove-max-address-length-dead-code
Open

fix(routes): remove unreachable MAX_ADDRESS_LENGTH check (#117)#145
ZacLou wants to merge 1 commit into
ourdao:mainfrom
ZacLou:fix/remove-max-address-length-dead-code

Conversation

@ZacLou

@ZacLou ZacLou commented Sep 1, 2026

Copy link
Copy Markdown

Closes #117

Removes the unreachable MAX_ADDRESS_LENGTH check in the challenge route:

  • isValidStellarAddress already rejects anything that is not a well-formed 56-character G… key, so the later length check can never fire.
  • The constant would also block 69-character muxed M… addresses once the validator is widened, so removing it avoids a future foot-gun.

Verified with:

  • npm run typecheck
  • npm run lint (only pre-existing warnings)

isValidStellarAddress already accepts only well-formed 56-character
G... keys, so the subsequent length check can never fire. It also
would block 69-character muxed M... addresses once the validator is
widened, so remove the dead code now.

Closes ourdao#117
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.

MAX_ADDRESS_LENGTH blocks muxed addresses and is unreachable dead code

1 participant