From 5ef34264a15e6703df56582c70a93cd19e1fd981 Mon Sep 17 00:00:00 2001 From: 0xward <0xward.dev@gmail.com> Date: Mon, 3 Aug 2026 06:46:54 +0000 Subject: [PATCH] An embedded wallet born on Ethereum cannot pay for anything here MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Privy provider never named a chain, so every embedded wallet it mints was created on Ethereum mainnet. That is the same failure the owner hit in the OKX browser an hour ago, arriving from the other direction: a real wallet, a real key, and the wrong network — so it can neither pay for a Season Pass nor, once season payouts start reaching embedded wallets, be somewhere the money is useful. defaultChain: celo the chain an embedded wallet is CREATED on supportedChains: [celo] the list an EXTERNAL wallet is asked to be in Both, because the gate offers both kinds of sign-in and neither should land somewhere the game cannot transact. `celo` is imported from viem/chains — the same object lib/WagmiIsland.tsx hands wagmi — so the two halves of the app cannot drift onto different ideas of which network this game runs on. This is a prerequisite for paying through Privy, not the whole of it: a fresh embedded wallet still holds nothing, and buying a $1 item means transferring $1 of real USDT. The funding question is the owner's to answer and is not decided here. Verified: tsc clean, build unchanged at 142/242 kB, 24/24 test:privy, check:copy clean, lint 35. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_017A764RdnwpyWnG7uCNhMiQ --- components/game/PrivyGate.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/components/game/PrivyGate.tsx b/components/game/PrivyGate.tsx index 86ffc3f..0cf5d4b 100644 --- a/components/game/PrivyGate.tsx +++ b/components/game/PrivyGate.tsx @@ -2,6 +2,10 @@ import { useCallback, useEffect, useRef, useState } from 'react' import { PrivyProvider, usePrivy, useLoginWithOAuth } from '@privy-io/react-auth' +// The chain object itself, from viem — Privy takes a viem Chain, and this is +// the same `celo` lib/WagmiIsland.tsx configures wagmi with, so the two cannot +// drift onto different ideas of which network the game runs on. +import { celo } from 'viem/chains' import { privyAppId, liftGateVeil } from '@/lib/privyGateFlag' import { GoogleMark, MailMark, WalletMark } from './SignInMarks' import '@/styles/signin.css' @@ -223,6 +227,20 @@ export default function PrivyGate(props: PrivyGateProps) { // Nested under `ethereum` — Privy v3 splits the setting per chain // family, and the flat form silently does nothing. embeddedWallets: { ethereum: { createOnLogin: 'users-without-wallets' } }, + // ── CELO, OR THE WALLET IS BORN USELESS ─────────────────────────── + // + // Unset, Privy defaults an embedded wallet to Ethereum mainnet — the + // same class of bug the owner just hit in the OKX browser, where a + // perfectly connected wallet could not pay because it was on the wrong + // chain. A wallet minted here has exactly one job: hold a prize and, in + // time, pay for things on Celo. + // + // `defaultChain` is what an embedded wallet is created on; + // `supportedChains` is the list an EXTERNAL wallet is asked to be in. + // Both, so neither kind of player arrives somewhere the game cannot + // transact. + defaultChain: celo, + supportedChains: [celo], }} >