-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: (WC) do not return Safe as available on all optional Namespaces #3725
Conversation
Branch preview✅ Deploy successful! Storybook: |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
1012.38 KB (🟡 +1 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Coverage report
Show files with reduced coverage 🔻
Test suite run success1468 tests passing in 202 suites. Report generated by 🧪jest coverage report action from eec99d2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🦸
requiredChains.map(stripEip155Prefix), | ||
optionalChains.map(stripEip155Prefix), | ||
) | ||
const supportedChainIds = [currentChainId].concat(requiredChains.map(stripEip155Prefix)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't add the optional chains wouldn't that mean that the moment you switch your network the connection will be closed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I will readd those :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can not return a chainId in the namespace without an account. So we would be stuck with the same workaround in the end which caused the bug.
I feel like having to reconnect after switching to another Safe is the lesser devil than not being able to connect on any chain other than mainnet. But We should discuss this.
I got this alert/prompt when I tried to connect in Uniswap with Polygon which I don't think is intended After accepting it (I wrote "Continue" but idk what to write because it doesn't say) didn't tirgger anymore, the only way to trigger it is by clearing the LS and cache of the safe app and trying again Go to Uniswap, set it to ethereum there |
I tried to connect to OpenSea several times. In the safe app you can see the connection (in the top bar) but in openSea, or the WC modal with the QR code doesn't even close or the WC option in the modal where you select the wallet shows a infinite loading icon. I'm not don't know if this an issue from OpenSea side, but in current prod the connection works fine (the message pop's up, I signed, I connect just fine...) |
@francovenica
|
This is expected and this is actually what this fix does:
|
I also can not reproduce this: |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Well, I tried to reproduce again the issues I reported, but they are working fine now I cannot make that prompt to show up anymore I already tried Curve and Safe-as-owner and those work fine as well LGTM |
What it solves
Sometimes the chainChanged event is ignored if the connected dapp did not acknowledge the new session yet.
Then the dapp is stuck with a wrong chain on which the Safe is not deployed.
How this PR fixes it
How to test it
Checklist