Skip to content

fix(safe): handle Safe-over-WalletConnect schedule/execute/cancel flows#3

Merged
AntoTG merged 3 commits into
mainfrom
feat/v1.1.1
May 19, 2026
Merged

fix(safe): handle Safe-over-WalletConnect schedule/execute/cancel flows#3
AntoTG merged 3 commits into
mainfrom
feat/v1.1.1

Conversation

@AntoTG

@AntoTG AntoTG commented May 19, 2026

Copy link
Copy Markdown
Member
  • Detect Safe via WC peer metadata (name "Safe{Wallet}" or url
    app.safe.global), reading the live connector instance from
    useConnections() rather than the shallow useAccount() descriptor.
  • Skip waitForTransactionReceipt when Safe is connected — the returned
    hash is a Safe-tx-hash, not an Ethereum tx hash, so the receipt poll
    hangs forever. Show the user a "confirm in Safe" toast instead.
  • Add 5-minute timeout to waitForTransactionReceipt as a safety net for
    EOAs (and for any Safe-like wallet we may not detect).
  • Latch the role/minDelay reads in useTimelockRoles so a flaky RPC
    refetch doesn't make the New operation / Execute / Cancel buttons
    flicker out on mainnet.
  • 26 new tests covering Safe detection, the latch, and connectors lib.

- Detect Safe via WC peer metadata (name "Safe{Wallet}" or url
  app.safe.global), reading the live connector instance from
  useConnections() rather than the shallow useAccount() descriptor.
- Skip waitForTransactionReceipt when Safe is connected — the returned
  hash is a Safe-tx-hash, not an Ethereum tx hash, so the receipt poll
  hangs forever. Show the user a "confirm in Safe" toast instead.
- Add 5-minute timeout to waitForTransactionReceipt as a safety net for
  EOAs (and for any Safe-like wallet we may not detect).
- Latch the role/minDelay reads in useTimelockRoles so a flaky RPC
  refetch doesn't make the New operation / Execute / Cancel buttons
  flicker out on mainnet.
- 26 new tests covering Safe detection, the latch, and connectors lib.
Comment thread src/lib/connectors.ts Outdated
Comment thread src/hooks/useIsSafeWallet.ts Outdated
Comment thread src/hooks/useTimelockRoles.ts
Comment thread src/components/OperationForm.tsx
@kilo-code-bot

kilo-code-bot Bot commented May 19, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • src/components/OperationForm.tsx
  • src/pages/NewOperation.tsx
  • src/pages/Operations.tsx

Resolved Since Previous Review

  • Schedule receipt timeouts now surface a pending/unknown receipt state instead of reporting confirmed scheduling success.

Change Summary

  • Extends the schedule completion callback with a receiptPending flag.
  • Routes that flag from NewOperation to Operations through navigation state.
  • Shows an informational toast for schedule submissions whose receipt was not observed within the timeout.

Reviewed by gpt-5.5-2026-04-23 · 242,917 tokens

Comment thread src/components/OperationForm.tsx Outdated
@AntoTG AntoTG merged commit 8a0544c into main May 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants