Skip to content

Fix Zcash unified address validation minimum length #749

Description

@coderabbitai

Problem

The temporary hotfix in PR #748 uses a minimum length of 128 characters for Zcash unified addresses (u1 prefix). However, per ZIP-316, the actual minimum Bech32m string length for a mainnet unified address is 69 characters.

The current validation will reject all valid unified addresses between 69-127 characters in length.

Expected Behavior

Unified addresses should require a minimum of 69 characters:

  • 2-char HRP + separator ("u1")
  • 61 data characters (ceil(8*38/5) for 38-byte minimum payload)
  • 6 checksum characters

Reference

Location

src/components/DefuseSDK/utils/validateAddress.ts lines 140-143

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions