Route MoonPay iOS buys through a Private Relay interstitial check - #6151
Open
j0ntz wants to merge 2 commits into
Open
Route MoonPay iOS buys through a Private Relay interstitial check#6151j0ntz wants to merge 2 commits into
j0ntz wants to merge 2 commits into
Conversation
Contributor
Author
j0ntz
force-pushed
the
jon/moonpay-relay-interstitial
branch
2 times, most recently
from
August 13, 2026 20:19
1c042b5 to
4cf563e
Compare
j0ntz
marked this pull request as ready for review
August 13, 2026 20:21
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
j0ntz
force-pushed
the
jon/moonpay-relay-interstitial
branch
from
August 13, 2026 20:22
4cf563e to
bbb7713
Compare
iOS buy opens the MoonPay widget in an SFSafariViewController whose traffic can egress through iCloud Private Relay, so a widget URL bound to the app-fetch IP mismatches what MoonPay observes for relay users and will fail their buys once IP-match enforcement turns on. The buy path now asks the info server for a relay-check interstitial URL and opens that in the Safari view: the server observes the Safari view's own egress and 302s to the widget URL signed with the IP binding when the addresses agree, or without it when they diverge. Any interstitial failure falls back to today's bound flow, so the change cannot regress buys even against servers without relay-check support. Sell and Android are untouched. MOONPAY_RELAY_CHECK_SIGN_PROXY (dev builds only) reroutes the one relay-check POST through an alternate egress so the unbound branch is reproducible on a simulator. The TDD at src/docs/moonpay-private-relay-interstitial.md documents both repos' changes.
j0ntz
force-pushed
the
jon/moonpay-relay-interstitial
branch
4 times, most recently
from
August 13, 2026 23:59
83ca9f4 to
18a9532
Compare
j0ntz
force-pushed
the
jon/moonpay-relay-interstitial
branch
from
August 14, 2026 07:22
18a9532 to
aab11af
Compare
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Technical Design Document
moonpay-private-relay-interstitial.md
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
EdgeApp/edge-info-server#160 (soft dependency: without it the app falls back to today's bound flow, so this PR is safe to land first)
Requirements
If you have made any visual changes to the GUI. Make sure you have:
No visual changes: the buy flow's screens are unchanged; only the URL handed to the external Safari view differs.
Description
Asana task
Closes the iCloud Private Relay gap in the MoonPay iOS buy flow. iOS buy opens the widget in an SFSafariViewController whose traffic can egress through Private Relay, so the widget URL bound to the app-fetch IP mismatches what MoonPay observes for relay users; once MoonPay enforces IP matching, those buys fail with an Unverified Connection error.
fetchMoonpayInterstitialUrl) and opens that in the Safari view. The server observes the Safari view's own egress and 302s to the widget URL signed with the IP binding when the addresses agree, or without it when they diverge (relay detected). The app never handles an IP.MOONPAY_RELAY_CHECK_SIGN_PROXY(env.json, dev builds only,__DEV__-gated) reroutes the one relay-check POST through an alternate egress so the unbound branch is reproducible on a simulator.The physical-device pass (iCloud+ account with Private Relay enabled) is a manual item; MoonPay IP-match enforcement for our key stays off until it completes.
Note
Medium Risk
Changes the critical fiat on-ramp URL path for all iOS MoonPay buys; fallback to bound signing limits regression risk if the info server is behind.
Overview
iOS MoonPay buys no longer open a directly IP-bound signed widget URL in
SFSafariViewController. They callfetchMoonpayInterstitialUrl(relayCheck: true) so the info server can compare app vs Safari egress and redirect to a bound or unbound signed widget. Any failure (old server, network, bad response) falls back tosignMoonpayUrlas today.Android buy and sell still use the direct bound signing path only.
Adds
MOONPAY_RELAY_CHECK_SIGN_PROXYinenvConfig(dev-only via__DEV__) to route the relay-check POST through alternate egress for simulator testing of the unbound branch.CHANGELOG entry and
src/docs/moonpay-private-relay-interstitial.mddocument the cross-repo design (depends on edge-info-server#160).Reviewed by Cursor Bugbot for commit aab11af. Bugbot is set up for automated code reviews on this repo. Configure here.