Add referral programme and promo-code client - #942
Draft
JonnyLuca wants to merge 53 commits into
Draft
Conversation
JonnyLuca
force-pushed
the
01a03535-referral-promo
branch
from
August 26, 2026 23:45
225ff69 to
ff3321f
Compare
Author
|
Fixes RealUnitCH/intern#3 Branch rebased onto current
Draft against |
Author
|
Fixes RealUnitCH/intern#3 Android now reads Play Install Referrer once per install ( |
JonnyLuca
force-pushed
the
01a03535-referral-promo
branch
from
August 27, 2026 08:48
c6fff15 to
7d140ce
Compare
JonnyLuca
marked this pull request as ready for review
August 27, 2026 20:21
JonnyLuca
marked this pull request as draft
August 27, 2026 20:22
JonnyLuca
force-pushed
the
01a03535-referral-promo
branch
from
August 27, 2026 23:46
dbd4729 to
a4436d0
Compare
JonnyLuca
force-pushed
the
01a03535-referral-promo
branch
22 times, most recently
from
August 28, 2026 15:54
a7a32e3 to
f8cc804
Compare
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.
Summary / Zusammenfassung
EN. RealUnit referral programme and promo-code client (Offerte 24.08.2026 + mail Dani 17:42). The DFX API is the decision authority; this app is a rendering layer for eligibility, terms, invites, overview, frozen-CHF prizes, KYC invite/promo, and App Links.
DE. RealUnit-Empfehlungsprogramm und Promo-Code in der App (Offerte 24.08.2026 + Mail Dani 17:42). Die DFX-API entscheidet; die App rendert Kachel, Teilnahmebedingungen, Einladungen, Übersicht, Prämien mit eingefrorenem Frankenwert, KYC-Schritt Invite/Promo und App Links.
Scope, measurements, blockers
Scope
GET /v1/realunit/referral/summaryeligible(KYC-verified, ≥ 70 REALU, not an employee). Subtitle Erhalte 20 REALU pro Weiterempfehlung.GET /v1/realunit/referral/terms(version,markdown,markdownEn), with bundled assets only as an outage fallback; create-invite only after checkbox Ich habe die Teilnahmebedingungen gelesen und akzeptiert. Acceptance posts the exact rendered version so a newer server version reopens the gate.https://realunit.app/invite/{code}.getPayoutsdrops Pending. History watch includesreferralPayout(type 5).#spec-referral.integration_test/: entry card, terms checkbox gate, named invite, copy/share, overview (open/credited, sum, Aktienkurs), history prize, registration invite+promo, deeplinks/invite/*/promo/*, errors (invalid, not eligible, limit).golden-regenerate.yaml.swiftpm/caches are ignored and not committed.The app targets the live
DFXswiss/backendcontract. Public lookup usesGET /v1/realunit/referral/code/:codewithinviterName/inviteeName; invite creation sends the exactguestName-only request (terms acceptance is versioned separately) and create/list responses consume server-generatedcopyText/copyTextEnplusinviterName, pinned against backend draft #5290. SummaryopenCountis contract-tested against the same visible Open/Credited invite projection;sharePriceandsharePriceLabel: Aktienkursdrive the running “Insgesamt erhalten” valuation while payout history keeps frozen CHF values. Live terms consumeversion,markdown, andmarkdownEn1:1 from backend #5290, select the app language, take precedence over the bundled outage fallback, and pass the renderedversionthrough page → cubit →POST /terms/accept. The separate stand-in repository is not a ship path.Measured 2026-08-30 (native host checkout; signed current PR head
7ce9d355)flutter test --coverage --exclude-tags=golden --concurrency=4referral|promo|inviteunderlib/**pixel_jonny/emulator-5554swiftpm/cache filesThe macOS files run as isolated
flutter test <file> -d macosinvocations because Flutter’s combined desktop run lost the debug log connection after 3 passes even though every bundle built. Every integration file and assertion is green in isolated runs. The 66 local pixel differences (including 3 referral surfaces) are host-render differences: the authoritative CI workflow succeeded on this exact head without changing a baseline. No PNG was committed or regenerated locally.Golden runs (
golden-regenerate.yamlon RealUnitCH/app)7ce9d355; all CI baselines matched, no bot commit neededd2fa474→ bot commit566ff5e(ancestor of this head)300dd5a8457ee8e454c93e(no bot commit)3c273a7dPost-merge / operator actions
inviterName/inviteeNameresponse; merge/deploy remains human-owned./invite/*are HTTP 200.7F:8B:14:54:E2:91:E9:DB:56:21:69:0A:64:23:7C:34:80:78:C6:5B:B4:86:31:CA:02:9D:14:20:E6:3C:7B:40.PRIZE_WALLET_KEYfor settled 20 REALU transfers.Related: RealUnitCH/intern#3 (do not auto-close).