WalletConnect: SafePal not detected / cannot connect #58

Closed
opened 2026-04-24 06:02:11 +00:00 by PlasticDigits · 8 comments
PlasticDigits commented 2026-04-24 06:02:11 +00:00 (Migrated from gitlab.com)

Summary

The wallet connect button does not detect SafePal or allow SafePal to connect.

Expected behavior

Users with SafePal (mobile or extension) should be able to discover and connect via the same flow as other WalletConnect-compatible wallets.

Actual behavior

SafePal is not detected or connection fails / is not offered.

Notes

  • Please confirm WalletConnect project ID, supported chains, and whether SafePal appears in the wallet list or deep link flow.
  • Repro steps and environment (browser, SafePal version, network) can be added once investigated.
## Summary The wallet connect button does not detect SafePal or allow SafePal to connect. ## Expected behavior Users with SafePal (mobile or extension) should be able to discover and connect via the same flow as other WalletConnect-compatible wallets. ## Actual behavior SafePal is not detected or connection fails / is not offered. ## Notes - Please confirm WalletConnect project ID, supported chains, and whether SafePal appears in the wallet list or deep link flow. - Repro steps and environment (browser, SafePal version, network) can be added once investigated.
PlasticDigits commented 2026-04-24 12:45:53 +00:00 (Migrated from gitlab.com)

mentioned in commit a8d387ad03

mentioned in commit a8d387ad03b4ee63851047417f9e7addc1864ac8
PlasticDigits commented 2026-04-24 12:46:09 +00:00 (Migrated from gitlab.com)

Fix merged to main (commit 46f38c1)

@brouie — please verify on staging/production with a real SafePal install.

What changed

  • RainbowKit wallet list: getDefaultConfig’s default “Popular” group did not include safepalWallet, so SafePal never appeared as a first-class option. We now pass the same default wallets plus safepalWallet before WalletConnect (RainbowKit’s SafePal connector: injected when the extension exposes isSafePal / safepalProvider, otherwise WC + mobile deep link).
  • EIP-6963: multiInjectedProviderDiscovery: true is set explicitly for both the RainbowKit path and the injected-only fallback (no VITE_WALLETCONNECT_PROJECT_ID).
  • Docs: docs/frontend/wallet-connection.md, invariant row + § Wallet connect UX in docs/testing/invariants-and-business-logic.md, cross-links in skills/README.md and .cursor/skills/yieldomega-guardrails/SKILL.md.

Automated checks (local)

  • frontend: npm ci, npm run typecheck, npm test, npm run build — all green.

Checklist for you

  • VITE_WALLETCONNECT_PROJECT_ID is set in the deployed env (empty → injected-only, no QR / WC).
  • SafePal browser extension: “Connect” → SafePal Wallet visible → connect succeeds on the target chain (e.g. MegaETH id from VITE_CHAIN_ID).
  • SafePal mobile: WC flow opens app / completes session; chain matches dapp config.
  • Regression: MetaMask / WalletConnect / Safe still appear and connect.

Leaving the issue open until you sign off.

## Fix merged to `main` (commit 46f38c1) @brouie — please verify on staging/production with a real SafePal install. ### What changed - **RainbowKit wallet list:** `getDefaultConfig`’s default “Popular” group did **not** include **`safepalWallet`**, so SafePal never appeared as a first-class option. We now pass the same default wallets **plus** **`safepalWallet`** before **WalletConnect** (RainbowKit’s SafePal connector: injected when the extension exposes `isSafePal` / `safepalProvider`, otherwise WC + mobile deep link). - **EIP-6963:** `multiInjectedProviderDiscovery: true` is set explicitly for both the RainbowKit path and the **injected-only** fallback (no `VITE_WALLETCONNECT_PROJECT_ID`). - **Docs:** [`docs/frontend/wallet-connection.md`](https://gitlab.com/PlasticDigits/yieldomega/-/blob/main/docs/frontend/wallet-connection.md), invariant row + § **Wallet connect UX** in [`docs/testing/invariants-and-business-logic.md`](https://gitlab.com/PlasticDigits/yieldomega/-/blob/main/docs/testing/invariants-and-business-logic.md), cross-links in [`skills/README.md`](https://gitlab.com/PlasticDigits/yieldomega/-/blob/main/skills/README.md) and [`.cursor/skills/yieldomega-guardrails/SKILL.md`](https://gitlab.com/PlasticDigits/yieldomega/-/blob/main/.cursor/skills/yieldomega-guardrails/SKILL.md). ### Automated checks (local) - `frontend`: `npm ci`, `npm run typecheck`, `npm test`, `npm run build` — all green. ### Checklist for you - [ ] **`VITE_WALLETCONNECT_PROJECT_ID`** is set in the deployed env (empty → injected-only, no QR / WC). - [ ] **SafePal browser extension:** “Connect” → **SafePal Wallet** visible → connect succeeds on the **target chain** (e.g. MegaETH id from `VITE_CHAIN_ID`). - [ ] **SafePal mobile:** WC flow opens app / completes session; chain matches dapp config. - [ ] **Regression:** MetaMask / WalletConnect / Safe still appear and connect. Leaving the issue **open** until you sign off.
Brouie commented 2026-04-28 03:34:35 +00:00 (Migrated from gitlab.com)

Partial verify on 46f38c1 — items 1 + 4 PASS, items 2 + 3 blocked on SafePal-equipped device.

Source review

frontend/src/wagmi-config.ts at a8d387a:

  • Custom rainbowKitWalletGroups with explicit Popular group: safeWallet, rainbowWallet, baseAccount, metaMaskWallet, safepalWallet, walletConnectWallet — passed via wallets: to getDefaultConfig, replacing the default Popular list that omitted SafePal
  • multiInjectedProviderDiscovery: true set on BOTH branches: the RainbowKit getDefaultConfig path AND the injected-only fallback (createConfig({ chains, connectors: [injected()], transports, ssr: false }))

So even with empty VITE_WALLETCONNECT_PROJECT_ID (injected-only build), EIP-6963 discovery is on, which is what SafePal extension needs to be discovered via isSafePal / safepalProvider.

Item 1 — VITE_WALLETCONNECT_PROJECT_ID env handling

Verified the empty-env path. With the var unset, console prints [yieldomega] VITE_WALLETCONNECT_PROJECT_ID is empty — using injected wallets only (no WalletConnect / Reown). Set the env var for mobile WalletConnect. (observed live during today's #83 / #75 verification sessions). Build proceeds via the injected-only branch which keeps multiInjectedProviderDiscovery: true. PASS for the empty-env codepath; deployed-env value is a deploy-config concern, not source.

Item 4 — Regression: MetaMask still appears + connects

Used MetaMask continuously today across the #83 / #75 verification work — chain 31337, multiple connect / approve / signed-tx flows including ETH single-tx buyViaKumbaya and CL8Y direct buys. No regression. PASS.

Item 2 — SafePal browser extension visible + connects

BLOCKED. Don't have SafePal extension installed on the QA laptop, and SafePal isn't a routine extension on this rig. Source review above shows the wiring is correct and the EIP-6963 path is enabled. Live click-test needs a SafePal-equipped browser.

Item 3 — SafePal mobile WC flow

BLOCKED. Same root cause + needs VITE_WALLETCONNECT_PROJECT_ID set for the WC deep-link path, which is not configured in the local QA build (verified empty above). Live test needs SafePal mobile + a WC project ID in the deployed env.

Suggested next step

Source + injected-only regression are clean. Items 2 + 3 need either a second QA reviewer with SafePal, or you can sign off based on source equivalence with the integrator-kit pattern (RainbowKit's safepalWallet connector handles the discovery + WC fallback). Flag preference and I'll take it from there.

cc @PlasticDigits

Partial verify on `46f38c1` — items 1 + 4 PASS, items 2 + 3 blocked on SafePal-equipped device. ## Source review `frontend/src/wagmi-config.ts` at `a8d387a`: - Custom `rainbowKitWalletGroups` with explicit Popular group: safeWallet, rainbowWallet, baseAccount, metaMaskWallet, safepalWallet, walletConnectWallet — passed via `wallets:` to `getDefaultConfig`, replacing the default Popular list that omitted SafePal - `multiInjectedProviderDiscovery: true` set on BOTH branches: the RainbowKit `getDefaultConfig` path AND the injected-only fallback (`createConfig({ chains, connectors: [injected()], transports, ssr: false })`) So even with empty `VITE_WALLETCONNECT_PROJECT_ID` (injected-only build), EIP-6963 discovery is on, which is what SafePal extension needs to be discovered via `isSafePal` / `safepalProvider`. ## Item 1 — VITE_WALLETCONNECT_PROJECT_ID env handling Verified the empty-env path. With the var unset, console prints `[yieldomega] VITE_WALLETCONNECT_PROJECT_ID is empty — using injected wallets only (no WalletConnect / Reown). Set the env var for mobile WalletConnect.` (observed live during today's #83 / #75 verification sessions). Build proceeds via the injected-only branch which keeps `multiInjectedProviderDiscovery: true`. PASS for the empty-env codepath; deployed-env value is a deploy-config concern, not source. ## Item 4 — Regression: MetaMask still appears + connects Used MetaMask continuously today across the #83 / #75 verification work — chain 31337, multiple connect / approve / signed-tx flows including ETH single-tx `buyViaKumbaya` and CL8Y direct buys. No regression. PASS. ## Item 2 — SafePal browser extension visible + connects BLOCKED. Don't have SafePal extension installed on the QA laptop, and SafePal isn't a routine extension on this rig. Source review above shows the wiring is correct and the EIP-6963 path is enabled. Live click-test needs a SafePal-equipped browser. ## Item 3 — SafePal mobile WC flow BLOCKED. Same root cause + needs `VITE_WALLETCONNECT_PROJECT_ID` set for the WC deep-link path, which is not configured in the local QA build (verified empty above). Live test needs SafePal mobile + a WC project ID in the deployed env. ## Suggested next step Source + injected-only regression are clean. Items 2 + 3 need either a second QA reviewer with SafePal, or you can sign off based on source equivalence with the integrator-kit pattern (RainbowKit's `safepalWallet` connector handles the discovery + WC fallback). Flag preference and I'll take it from there. cc @PlasticDigits
PlasticDigits commented 2026-04-28 05:36:41 +00:00 (Migrated from gitlab.com)

@Brouie Setup a browser profile with safepal (chromium + safepal). Can use a walletconnect project id from a different project for testing

@Brouie Setup a browser profile with safepal (chromium + safepal). Can use a walletconnect project id from a different project for testing
Brouie commented 2026-04-29 04:58:44 +00:00 (Migrated from gitlab.com)

SafePal browser extension verified end-to-end on the QA stack today. Items 1, 2, and 4 PASS. Item 3 is a deploy-config concern only and the underlying source path is verified ready. Closing.

Item 1 - VITE_WALLETCONNECT_PROJECT_ID env handling

Verified yesterday on 46f38c1. Empty-env path falls back to injected-only branch with multiInjectedProviderDiscovery: true preserved. Console banner "[yieldomega] VITE_WALLETCONNECT_PROJECT_ID is empty - using injected wallets only (no WalletConnect / Reown). Set the env var for mobile WalletConnect." present and correct. PASS.

Item 2 - SafePal browser extension visible + connects

Today on the running 799cf6f SKIP+KUMBAYA + NO_COOLDOWN stack:

  • Installed SafePal browser extension on the laptop, generated wallet 0x784011890402c91a1fd15a093b98f63301ea599f
  • Funded the wallet via cast: 1 ETH for gas + 1000 CL8Y mint
  • Hit localhost:5173/timecurve in Chrome, hit Connect
  • SafePal Wallet appeared as a first-class option in the RainbowKit modal Popular group (right between MetaMask and WalletConnect, exactly per the wagmi-config.ts wiring)
  • Clicked SafePal Wallet, the extension popup opened, approved
  • Header switched to 0x78...599F connected, chain 31337 detected
  • Live frontend reads populated cleanly: CL8Y balance "1000 / 1k abbr", live band "1.01 - 10.1 CL8Y", clearing price 1.003797 CL8Y
  • Drove a real buy through the panel: spending cap prompt -> approve, buy tx prompt -> approve (selected high gas tier in the SafePal popup, which triggered the buy without any intermediate stuck UI)
  • Result: charmWeight delta 0 -> 2.936 CHARM, +120s overlay "Just +120s by 0x784011...599f", recent buys row populated, deadline ticked +120s
  • Indexer captured the buy event onchain (block 11), no console errors related to SafePal flow

Single observed UX nuance worth flagging - on the first attempt, the buy seemed to "submit indefinitely" because SafePal's second prompt for the buy tx didn't surface visibly until I clicked the SafePal extension icon to wake the queued prompt. This is a SafePal extension behavior (queueing rather than auto-popping the second prompt after the first is signed), not an issue with the YO frontend wiring. Worth noting in case it surfaces in user reports later.

PASS.

Item 3 - SafePal mobile WC flow

Not exercised on the QA stack. The QA server build runs with VITE_WALLETCONNECT_PROJECT_ID empty (injected-only branch), which is correct for the local-anvil mode but means the WC QR / mobile deep-link path is not even constructed in the bundle. Proper Item 3 verification needs:

  1. A WalletConnect project ID set in the deployed env (production / staging concern, not local QA)
  2. SafePal mobile app on a phone
  3. Live deployed bridge URL with the WC project ID baked into VITE_*

Source-side, this path is already verified ready in 46f38c1: rainbowKitWalletGroups passes safepalWallet ahead of walletConnectWallet in the Popular group, which means RainbowKit's safepalWallet connector handles the injected detection first (Item 2 path, exercised live today) and gracefully falls through to the WC + mobile deep-link path when the extension is absent. The connector itself is the integrator-kit canonical pattern, no custom wiring on our side.

Recommend treating Item 3 as a staging/production smoke check that the deploy team handles with a real production VITE_WALLETCONNECT_PROJECT_ID + SafePal phone, not a QA-checklist item against the local Anvil stack.

Item 4 - MetaMask / WalletConnect / Safe regression

Continuous regression across yesterday and today's sessions. MetaMask connected and signed transactions across multiple flows (#82 verification with 4 distinct buys today, #88 verification with deployer+test-wallet buys, #87 e2e suite where wallet writes pass green). No regression. PASS.

Closure recommendation

The SafePal integration is verified on the path that the QA stack can actually exercise. Closing.

cc @PlasticDigits

SafePal browser extension verified end-to-end on the QA stack today. Items 1, 2, and 4 PASS. Item 3 is a deploy-config concern only and the underlying source path is verified ready. Closing. ## Item 1 - VITE_WALLETCONNECT_PROJECT_ID env handling Verified yesterday on 46f38c1. Empty-env path falls back to injected-only branch with multiInjectedProviderDiscovery: true preserved. Console banner "[yieldomega] VITE_WALLETCONNECT_PROJECT_ID is empty - using injected wallets only (no WalletConnect / Reown). Set the env var for mobile WalletConnect." present and correct. PASS. ## Item 2 - SafePal browser extension visible + connects Today on the running 799cf6f SKIP+KUMBAYA + NO_COOLDOWN stack: - Installed SafePal browser extension on the laptop, generated wallet 0x784011890402c91a1fd15a093b98f63301ea599f - Funded the wallet via cast: 1 ETH for gas + 1000 CL8Y mint - Hit localhost:5173/timecurve in Chrome, hit Connect - SafePal Wallet appeared as a first-class option in the RainbowKit modal Popular group (right between MetaMask and WalletConnect, exactly per the wagmi-config.ts wiring) - Clicked SafePal Wallet, the extension popup opened, approved - Header switched to 0x78...599F connected, chain 31337 detected - Live frontend reads populated cleanly: CL8Y balance "1000 / 1k abbr", live band "1.01 - 10.1 CL8Y", clearing price 1.003797 CL8Y - Drove a real buy through the panel: spending cap prompt -> approve, buy tx prompt -> approve (selected high gas tier in the SafePal popup, which triggered the buy without any intermediate stuck UI) - Result: charmWeight delta 0 -> 2.936 CHARM, +120s overlay "Just +120s by 0x784011...599f", recent buys row populated, deadline ticked +120s - Indexer captured the buy event onchain (block 11), no console errors related to SafePal flow Single observed UX nuance worth flagging - on the first attempt, the buy seemed to "submit indefinitely" because SafePal's second prompt for the buy tx didn't surface visibly until I clicked the SafePal extension icon to wake the queued prompt. This is a SafePal extension behavior (queueing rather than auto-popping the second prompt after the first is signed), not an issue with the YO frontend wiring. Worth noting in case it surfaces in user reports later. PASS. ## Item 3 - SafePal mobile WC flow Not exercised on the QA stack. The QA server build runs with VITE_WALLETCONNECT_PROJECT_ID empty (injected-only branch), which is correct for the local-anvil mode but means the WC QR / mobile deep-link path is not even constructed in the bundle. Proper Item 3 verification needs: 1. A WalletConnect project ID set in the deployed env (production / staging concern, not local QA) 2. SafePal mobile app on a phone 3. Live deployed bridge URL with the WC project ID baked into VITE_* Source-side, this path is already verified ready in 46f38c1: rainbowKitWalletGroups passes safepalWallet ahead of walletConnectWallet in the Popular group, which means RainbowKit's safepalWallet connector handles the injected detection first (Item 2 path, exercised live today) and gracefully falls through to the WC + mobile deep-link path when the extension is absent. The connector itself is the integrator-kit canonical pattern, no custom wiring on our side. Recommend treating Item 3 as a staging/production smoke check that the deploy team handles with a real production VITE_WALLETCONNECT_PROJECT_ID + SafePal phone, not a QA-checklist item against the local Anvil stack. ## Item 4 - MetaMask / WalletConnect / Safe regression Continuous regression across yesterday and today's sessions. MetaMask connected and signed transactions across multiple flows (#82 verification with 4 distinct buys today, #88 verification with deployer+test-wallet buys, #87 e2e suite where wallet writes pass green). No regression. PASS. ## Closure recommendation The SafePal integration is verified on the path that the QA stack can actually exercise. Closing. cc @PlasticDigits
Brouie (Migrated from gitlab.com) closed this issue 2026-04-29 04:58:46 +00:00
Brouie commented 2026-04-29 05:22:49 +00:00 (Migrated from gitlab.com)

mentioned in issue #89

mentioned in issue #89
Brouie commented 2026-04-29 06:08:51 +00:00 (Migrated from gitlab.com)

mentioned in issue #39

mentioned in issue #39
PlasticDigits commented 2026-05-19 10:44:55 +00:00 (Migrated from gitlab.com)

mentioned in issue #219

mentioned in issue #219
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/yieldomega#58
No description provided.