feat(rn_cli_wallet): H2b POC — Explore dapp picker with wallet-originated auto-connect - #611
Draft
jakubuid wants to merge 6 commits into
Draft
feat(rn_cli_wallet): H2b POC — Explore dapp picker with wallet-originated auto-connect#611jakubuid wants to merge 6 commits into
jakubuid wants to merge 6 commits into
Conversation
…netized sessions (H2b POC) - Explore tab: four fee-honoring dapp tiles (same POC dapp, different default aggregator via URL param); one-time auto-connect consent (MMKV) - DappBrowser webview host: receives wc_session_offer postMessage (wc: navigation intercept as fallback), registers the pairing topic, pairs - Picker-scoped auto-approval in onSessionProposal — only pairings the Explore webview initiated; errors fall back to the normal modal - wc_feeTerms attached to every session approval (shared PickerUtil.buildSessionProperties; demo recipients, env-overridable) - Settings toggle: headless vs provider-direct connect variant Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…w' consent is per-run 'Not now' on the consent alert no longer persists across app starts — only 'Allow' is remembered. A Settings switch can grant/revoke auto-connect at any time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…iew (web-examples work consolidated on one branch) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…(H2b) Adds app.walletconnect.com/stake to the Explore picker as the first real dapp. DappBrowser now injects the H2b bridge wrapper at document start (walletConnectHost with autoConnect: true + postMessage), the design's primary auto-connect signal for native wallets — the stake tile URL carries no wc_auto/aggregator params. Legacy POC tiles keep the URL signal. EXPO_PUBLIC_STAKE_DAPP_URL overrides the tile URL for preview builds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019qEcbnmCpX3vq2fMxboNr4
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…link CI release builds write the env from the WALLETKIT_ENV_FILE secret, which has no EXPO_PUBLIC_STAKE_DAPP_URL — the tile then fell back to the production stake page, which has no auto-connect code. Default to the preview (share link tracks the walletconnect-apps#508 branch) so internal builds test the H2b flow out of the box; the env var still overrides for local dev. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Wallet-side implementation of the H2b in-wallet originated fee flow pilot (technical design). Adds an Explore tab that opens supported dapps in a webview with the auto-connect signal, so the session attributes to this wallet and carries fee terms.
How it works (per the design's wallet checklist)
DappBrowserinjectswindow.walletConnectHost = { autoConnect: true, postMessage }at document start on every page load (Explorer launches only — a generic in-wallet browser must not set the flag).{type: 'wc_session_offer', uri}back through the bridge; awc:navigation intercept covers pages where postMessage fails.pair(), and only proposals arriving on a recorded topic are auto-approved (PickerUtil); everything else keeps the normal proposal modal.SettingsStore.pickerAutoConnect, Settings + first-run prompt). Without consent the dapp still connects through the normal modal.wc_feeTermsinsessionProperties(interim carrier until the Dashboard/walletFeeendpoint +wallet_guide_idlookup exist).Tiles
Jupiter / 1inch / KyberSwap / Uniswap point at the session-fees POC dapp (
PICKER_DAPP_URL); the WalletConnect Stake WCT tile points atEXPO_PUBLIC_STAKE_DAPP_URL— set it to the portal preview (see.env.example) until the dapp-side auto-connect ships to production (WalletConnectFoundation/walletconnect-apps#508).Verified end-to-end (Galaxy S25 Ultra)
Offer → topic-scoped pair → auto-approve → session settled with fee terms readable dapp-side; session restore on reopen; disconnect no longer auto-reverts (dapp-side one-shot fix in #508). Known SDK issue found while testing: AppKit 1.8.23 leaves stale UI state when disconnecting a restored session (bug is in AppKit's disconnect cascade, not this PR — ticket to follow).
Known gaps (before pilot)
DappBrowser.onMessagedoesn't yet verify the webview is on the registered dapp origin before treating an offer as picker-initiated.wallet_guide_idsession property + Dashboard fee lookup (blocked on the Dashboard piece).🤖 Generated with Claude Code