Closed dlipicar closed 2 weeks ago
@benjthayer @John-44 do we need to store account by ENS name or by resolved address?
@benjthayer @John-44 do we need to store account by ENS name or by resolved address?
- What do we do if we store both and we find out later than the address does not match the ENS name any more or ENS name was released? Do we keep that account and display some popup? if resolved address now is different from what was resolved at the moment of saving - do we keep the old history and add new history of the freshly resolved address from this point of time further but we don't load the old history for the freshly resolved address?
- What do we do with collectibles in such a case - do we replace them for the new address and wipe old ones?
- What do we do with balance history? Maybe anything else I missed here. Sorry if it has been discussed at some point, feel free to point me to some info if there is.
We should only ever store account by ENS name, if the resolved address changes then we need to re-fetch all history.
So we should probably check that the ENS name still resolves to the address whose history we store periodically. If the ENS name still resolves to the address whose history we've stored, then all good we continue fetching new history. If the ENS name resolves to a new address, then we wipe all the stored history and re- fetch.
@benjthayer @John-44 @IvanBelyakoff IMO we shouldn't change the address in the background. The address are the "primary key" ens are mostly UX feature
e.g if your ENS name expires in 1 year and picked up by someone else, we silently refetch all the history of another address
IMO when the ens is not associated with an address we simply display the raw address. WDYT?
Description
Tried adding an ENS name as a watched address, but the activity check seems to get stuck.
https://github.com/status-im/status-desktop/assets/11161531/3bd41abe-7bcc-48c2-be0a-92e7853c68bf
Console shows this error