Honor af affiliate parameter on deep.edge.app links#5999
Open
Honor af affiliate parameter on deep.edge.app links#5999
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 72d2c96. Configure here.
Extract the af query parameter from deep.edge.app deep links and activate the promotion alongside the inner payload. Empty-path and explicit promotion paths collapse to a plain PromotionLink to match dl.edge.app. Payloads with an installerId now route through a new AffiliateLink wrapper that dispatches activatePromotion before delegating to the inner link handler.
1c43aff to
3fc3234
Compare
samholmes
requested changes
Apr 25, 2026
Contributor
samholmes
left a comment
There was a problem hiding this comment.
Need answers and understanding otherwise it seems fine..
Comment on lines
+155
to
+159
| export interface AffiliateLink { | ||
| type: 'affiliate' | ||
| installerId: string | ||
| link: DeepLink | ||
| } |
Contributor
There was a problem hiding this comment.
What's with the new type? Why don't we just use the old type and call it a day? What's the new type for and what does it do? I expected a simple translation from deep.edge.app to a dl.edge.app kind of thing.
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.

Description
Asana task
Extend deep link parsing so
https://deep.edge.app/...URLs can carry anafaffiliate parameter the same waydl.edge.appalready does. Whenafappears on a URL that also has a payload (e.g. apayprivate-key import), the deep link now resolves to a newAffiliateLinkwrapper that activates the promotion and then delegates to the inner link. Whenafis the only meaningful content (empty path or explicit/promotion/...path), the result collapses to a plainPromotionLink— matching thedl.edge.appbehavior.Unlocks the BCHx gift-card use case: a single scanned QR can both import the BCH private key and activate the
af=<installerId>referral that surfaces an in-app Telegram-group card.Asana: BCHx Cards – Add referral parameter to deep.edge.app links
Files touched
src/util/DeepLinkParser.ts— pre-pass that extractsaffromdeep.edge.appURLs and wraps or unwraps the result.src/types/DeepLinkTypes.ts— newAffiliateLinktype in theDeepLinkunion + updated header comment.src/actions/DeepLinkingActions.tsx— handleaffiliatetype:activatePromotion+ recurse into inner link.src/__tests__/DeepLink.test.ts— new cases for bare-af, promotion+af (no double wrap), pay+af, plugin+af.CHANGELOG.md.CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
No visual changes — deep-link parser + action-layer only. Verified via
yarn test(all related suites pass).Note
Medium Risk
Changes deep-link parsing and dispatch flow so
deep.edge.appURLs can trigger promotion activation and then route to another payload, which could affect inbound link handling if parsing/recursion is wrong.Overview
Adds support for
?af=<installerId>onhttps://deep.edge.app/...URLs.When
afis present, parsing now either collapses to apromotionlink (if the URL is effectively just a promo) or produces a newaffiliatewrapper that activates the promotion and then delegates to the inner deep link; the dispatcher (DeepLinkingActions) gains a matchingaffiliatecase, and tests/CHANGELOG are updated to cover these scenarios (including host lookalike protection).Reviewed by Cursor Bugbot for commit 3fc3234. Bugbot is set up for automated code reviews on this repo. Configure here.