Skip to content

feat: Route all stamp purchases through Relay only - #142

Merged
0xCardiE merged 3 commits into
mainfrom
feat/relay-only-flow
Jun 26, 2026
Merged

0xCardiE merged 3 commits into
mainfrom
feat/relay-only-flow

Conversation

@0xCardiE

Copy link
Copy Markdown
Collaborator

Summary

MetaMask was flagging transactions involving our custom SushiSwapStampsRouter and direct BZZ registry calls as malicious. This PR removes those alternate paths and consolidates stamp purchases into a single flow via the Relay API.

  • Removed direct BZZ purchases on Gnosis (handleDirectBzzTransactions)
  • Removed Gnosis same-chain swaps through SushiSwapStampsRouter (SushiQuotes.ts, executeSushiSwap)
  • Removed cross-chain Relay → USDC → SushiRouter bridge path (getRelayCrossChainWithSushiQuote)
  • Unified price estimation and execution to always use getRelaySwapQuotes + executeRelaySteps
  • Removed Gnosis token balance filtering that hid tokens without a Sushi route to BZZ
  • Cleaned up unused Sushi/router constants from the frontend (contracts remain in repo for reference)

Why

Wallet security warnings were blocking users from completing purchases. Relay is a trusted, established routing layer that handles swaps and contract calls without sending users to our custom router contract.

Test plan

  • Connect wallet on Gnosis with BZZ balance → buy storage → confirm MetaMask does not flag the transaction
  • Connect wallet on Gnosis with xDAI/USDC → buy storage → confirm Relay quote + execution works
  • Connect wallet on Ethereum/another chain → buy storage cross-chain → confirm Relay handles bridge + stamp creation
  • Top up an existing stamp from Gnosis and from a cross-chain token
  • Verify price estimation updates correctly for all supported chains/tokens
  • Confirm token dropdown shows all Gnosis tokens with balance (not filtered by Sushi route)

Remove SushiSwapStampsRouter and direct BZZ registry flows that MetaMask flags as malicious, consolidating quotes and execution on Relay for every chain and token.

@Cafe137 Cafe137 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, let's test this on staging

GNOSIS_WXDAI_ADDRESS and GNOSIS_USDC_ADDRESS were only referenced by the deleted Sushi router flow; drop them now that purchases route through Relay.
@0xCardiE 0xCardiE changed the title Route all stamp purchases through Relay only feat: Route all stamp purchases through Relay only Jun 26, 2026
Relay inserts the BZZ approval as a swap step, so the separate same-chain approval button, dropdown, and allowance checks are redundant. Drop them and the now-unused helpers/imports so every purchase runs through one Relay flow.
@0xCardiE
0xCardiE merged commit bcc6e28 into main Jun 26, 2026
1 check passed
@0xCardiE 0xCardiE self-assigned this Jun 26, 2026
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