Overview
Users who open blokaz.xyz in a standard browser (not MiniPay) get exactly one free game with no wallet connection available. After that game ends, a full-screen MiniPay gate blocks further play and directs them to download MiniPay.
User Flow
- User lands on blokaz.xyz in a regular browser
- All wallet connect buttons are hidden — a badge reads: "PLAY 1 FREE TRIAL — MINIPAY REQUIRED TO COMPETE"
- User clicks PLAY CLASSIC — game starts in practice mode (no on-chain transactions)
- Game over → MiniPayGateModal covers the screen:
- Score displayed large
- Heading: "YOUR TRIAL IS OVER."
- Body: "To save your score, join the weekly leaderboard, and compete for USDT prizes — you need MiniPay."
- Primary CTA: "GET MINIPAY" → links to https://minipay.opera.com
- Secondary: "HOW IT WORKS" → opens HowToPlayModal
- No Play Again, no wallet connect
localStorage key blokaz:trial_used is set when the first game starts
- On subsequent visits from a non-MiniPay browser, the gate modal shows immediately on the lobby — no second game possible
Detection Logic
IS_MINIPAY already in src/utils/miniPay.ts — MiniPay users completely unaffected
- Add
isWebBrowser(): boolean → !IS_MINIPAY
- Add
hasUsedTrial(): boolean → reads localStorage.getItem('blokaz:trial_used') === '1'
- Gate condition:
isWebBrowser() && hasUsedTrial()
Files to Change
src/utils/miniPay.ts — add helpers
src/components/LobbyScreen.tsx — hide wallet UI on web, show trial badge, show gate if trial used
src/components/GameScreen.tsx — set trial key on game start; route game-over to gate when on web
src/components/MiniPayGateModal.tsx — new full-screen non-dismissible modal
Notes
- Trial game must NOT call
contractStartGame — pure practice mode only
- Web3Auth and MetaMask hidden entirely on web (not just greyed out)
- Clearing localStorage gives another trial — acceptable tradeoff
Contract change required: No
Overview
Users who open blokaz.xyz in a standard browser (not MiniPay) get exactly one free game with no wallet connection available. After that game ends, a full-screen MiniPay gate blocks further play and directs them to download MiniPay.
User Flow
localStoragekeyblokaz:trial_usedis set when the first game startsDetection Logic
IS_MINIPAYalready insrc/utils/miniPay.ts— MiniPay users completely unaffectedisWebBrowser(): boolean→!IS_MINIPAYhasUsedTrial(): boolean→ readslocalStorage.getItem('blokaz:trial_used') === '1'isWebBrowser() && hasUsedTrial()Files to Change
src/utils/miniPay.ts— add helperssrc/components/LobbyScreen.tsx— hide wallet UI on web, show trial badge, show gate if trial usedsrc/components/GameScreen.tsx— set trial key on game start; route game-over to gate when on websrc/components/MiniPayGateModal.tsx— new full-screen non-dismissible modalNotes
contractStartGame— pure practice mode onlyContract change required: No