Uniswap / Uniswap/interface

gnosis SafeApp introduces a 300ms pageload timeout

Open
#2,338 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

To use the gnosis SafeApp, you must check for it before using other injectors, so it sits in the pageload critical path.

To check for SafeApp, the SDK races an iframe postMessage with a 300ms timeout (see https://github.com/gnosis/safe-apps-sdk/blob/master/packages/safe-apps-web3-react/src/connector.ts#L52). This should be skipped if we are not in an iframe, and there should be an immediate, deterministic way to tell if we are in a SafeApp.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/safe-apps-web3-react/src/connector.ts at the referenced SafeApp check and trace how the iframe postMessage timeout is used before other injectors. Verify the iframe condition and the requested deterministic SafeApp signal; done means non-iframe page loads no longer wait 300ms while SafeApp detection remains reliable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.