Skip to content

refactor: use Set for shared storefront addresses and checksum remapped address#1864

Merged
ryanio merged 3 commits intomainfrom
refactor/checksum-shared-storefront
Jan 14, 2026
Merged

refactor: use Set for shared storefront addresses and checksum remapped address#1864
ryanio merged 3 commits intomainfrom
refactor/checksum-shared-storefront

Conversation

@ryanio
Copy link
Collaborator

@ryanio ryanio commented Jan 14, 2026

Summary

  • Convert SHARED_STOREFRONT_ADDRESSES from array to Set for O(1) lookups (consistent with VALID_PROTOCOL_ADDRESSES pattern)
  • remapSharedStorefrontAddress returns checksummed lazy mint adapter address only for shared storefront addresses
  • Non-shared storefront addresses are returned unchanged (preserving original case)

Test plan

  • All tests pass (npm test)

🤖 Generated with Claude Code

ryanio and others added 2 commits January 14, 2026 12:28
…med addresses

- Convert SHARED_STOREFRONT_ADDRESSES from array to Set for O(1) lookups
- remapSharedStorefrontAddress now returns checksummed addresses via ethers.getAddress()
- Gracefully handle invalid addresses by returning them unchanged
- Remove uppercase address test since we don't need to handle 0X prefix

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Return original tokenAddress unchanged for non-shared storefront addresses.
Only return checksummed address when remapping to lazy mint adapter.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ryanio ryanio changed the title refactor: DRY up shared storefront address handling with checksummed output refactor: use Set for shared storefront addresses and checksum remapped address Jan 14, 2026
@ryanio ryanio merged commit 00e9cca into main Jan 14, 2026
7 of 8 checks passed
@ryanio ryanio deleted the refactor/checksum-shared-storefront branch January 14, 2026 20:36
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.

1 participant