Skip to content

feat: implement multisig sync sign flow over WalletConnect [PERA-3782] [PERA-3780]#506

Open
yasincaliskan wants to merge 2 commits into
mainfrom
yasincaliskan/PERA-3780
Open

feat: implement multisig sync sign flow over WalletConnect [PERA-3782] [PERA-3780]#506
yasincaliskan wants to merge 2 commits into
mainfrom
yasincaliskan/PERA-3780

Conversation

@yasincaliskan
Copy link
Copy Markdown
Collaborator

Description

  • Implements the multisig sync flow: a dApp can request a signature from a multisig account over WalletConnect and receive the fully assembled signed transaction back on the same connection

Multisig sign handoff

  • When a dApp sends a multisig sign request over WC, the request is registered with the backend and tracked via a process-wide handoff registry (walletConnectHandoffs).
  • An app-root resolver hook (useWalletConnectHandoffResolver) polls the backend until participants reach the signing threshold, then assembles the signed msig bytes (assembleSignedMultisigTransactions) and delivers them to the dApp.
  • Poll outcomes are classified by a pure, unit-tested classifyHandoffPoll (ready / soft-reject / error / keep-polling), with exponential backoff.
  • Sign requests are marked confirmed via useMarkSignRequestsConfirmedMutation.

Bridge-socket recovery

  • WC v1 sessions own a single bridge WebSocket the OS suspends on background; v1 silently queues outgoing messages into the dead socket, so a signed response never reaches the dApp despite a "success" UI.
  • New connectorRegistry owns the connector map plus socket-liveness checks: ensureConnectorReady recreates a connector from its stored session when the socket is dead (escaping the zombie-socket reconnect deadlock).
  • useWalletConnectForegroundReconnect warms all dead sockets on every background -> foreground transition.

Related Issues

Checklist

  • Have you tested your changes locally?
  • Have you reviewed the code for any potential issues?
  • Have you documented any necessary changes in the project's documentation?
  • Have you added any necessary tests for your changes?
  • Have you updated any relevant dependencies?

@yasincaliskan yasincaliskan self-assigned this May 15, 2026
@yasincaliskan yasincaliskan requested a review from a team as a code owner May 15, 2026 19:16
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.

1 participant