Closed shoom3301 closed 1 week ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
cosmos | 🔄 Building (Inspect) | Visit Preview | May 21, 2024 8:19am |
cowfi | 🔄 Building (Inspect) | Visit Preview | May 21, 2024 8:19am |
explorer-dev | ✅ Ready (Inspect) | Visit Preview | May 21, 2024 8:19am |
swap-dev | ❌ Failed (Inspect) | May 21, 2024 8:19am | |
widget-configurator | 🔄 Building (Inspect) | Visit Preview | May 21, 2024 8:19am |
Have not reviewed yet, just based on the PR description, the item 6
:
Added a migration to support the change above. The migration resets selectedWallet and selectedWalletBackfilled values in localStorage (commit)
Won't the hotfix to clear the local storage make this migration unreachable? My understanding is that the storage clearing happens on emergency.js, before the app is loaded. Then, when we look for the migration, there's no old state to clear as it was removed, no?
Have not reviewed yet, just based on the PR description, the item
6
:Added a migration to support the change above. The migration resets selectedWallet and selectedWalletBackfilled values in localStorage (commit)
Won't the hotfix to clear the local storage make this migration unreachable? My understanding is that the storage clearing happens on emergency.js, before the app is loaded. Then, when we look for the migration, there's no old state to clear as it was removed, no?
The fix in emergency.js
only fixes localStorage keys with versions.
The migration in this PR is about redux_localstorage_simple_user
localStorage key.
Summary
Fixes #3987
The implementation is done following the specification: https://eips.ethereum.org/EIPS/eip-6963
Technical details
multiInjectedProvidersAtom
which contains all announced injected providers (commit)Eip6963Option
component to display a button to connect Eip6963 provider (commit)selectedEip6963ProviderAtom
which contains current selected Eip6963 provider. In the next commits it will be renamed toselectedEip6963ProviderRdnsAtom
(commit)useWalletMetaData()
in order to support Eip6963 providers (commit)INJECTED
andINJECTED_WIDGET
connection types and it is very confusing. Because in fact,INJECTED
is Metamask andINJECTED_WIDGET
is any injected provider. Since now we don't have a special flow for Metamask and consider it as any other Eip6963 provider I removedINJECTED
and renamedINJECTED_WIDGET
->INJECTED
. Now we have onlyINJECTED
and it covers any injected wallets (Eip6963, window.ethereum, widget) (commit)selectedWallet
andselectedWalletBackfilled
values inlocalStorage
(commit)useEagerlyConnect()
to support Eip6963 providers. We haveselectedWallet
parameter in redux store andselectedEip6963ProviderRdnsAtom
in jotai atom. Both values are persisted inlocalStorage
. NowuseEagerlyConnect()
checks, if there is aselectedWallet
andselectedEip6963ProviderRdns
inlocalStorage
, then we wait until selected Eip6963 provider is announced and then connect it (commit)Functional changes
3541 case was affected. I've tested it and it was good, but anyway, please take into account.
To Test
Please, do tests in the last PR of the waterfall: https://github.com/cowprotocol/cowswap/pull/4420