fix: only try SafeApp connection in an iframe (#2340)
* fix: only try SafeApp connection in an iframe Improves non-iframe pageload by 300ms. Fixes #2338. The Gnosis check for a SafeApp races a postMessage and a 300ms timeout [1]. The SafeApp embeds the interface in an iframe, so this avoids the check when not in iframes. [1]: https://github.com/gnosis/safe-apps-sdk/blob/f224869dd5ae810db8cecad08fbbcfaa6c046d9d/packages/safe-apps-web3-react/src/connector.ts#L52 * refactor: IS_IN_IFRAME const
Showing
Please register or sign in to comment