-
Notifications
You must be signed in to change notification settings - Fork 54
Reset ens on redux state when changing accounts #2340
Conversation
|
@alfetopito , this works when change accounts using 'Change account' buttons. |
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.
Approved because this seems like it should be there but I couldn't actually reproduce the issue on staging because once you actually change the addres/ens to search and press the check claimable vcow
button and call the handleCheckClaim
the ens is changed in that method.
https://watch.screencastify.com/v/bksGdR4yx5on8e8FAG3N
@elena-zh In my opinion that is not supposed to happen once you search for some address and then change the wallet. You should still see the results for the address you search for and not results for the new wallet you just changed/connected to. |
@nenadV91 , yes, thanks!
|
I believe changing using the link is what this PR was intending to fix. If you change using MM, it changes the connected wallet, and ALSO the claiming wallet when you were claiming for yourself. However, Elena, i find it ok (and is even nice) that it remembers the external wallet your are claiming for when you change wallet in MM |
@@ -96,6 +96,7 @@ export default function Claim() { | |||
// handle change account | |||
const handleChangeAccount = () => { | |||
setActiveClaimAccount('') | |||
setActiveClaimAccountENS('') |
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.
yes! that was my lucky guess :P
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.
ah no, my lucky guess was the resetClaimUi
Co-authored-by: Leandro <[email protected]>
* 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
Summary
ENS names now properly reset when account is changed
To Test
vitalik.eth
The same does not happen right now on staging, the account name displayed will remain the ens name.