Open pedropombeiro opened 4 years ago
Is it possible for me to get edit rights to this repo? I'd like to add this project to the core project board :) cc @adambabik @cammellos
I don't have access myself, probably @adambabik can help
@rachelhamlin should work. Happy coding :)
Thanks @adambabik would you mind adding StatusSceptre as well? I've locked myself out of my own Github account. 🙄
This is the protocol side of https://github.com/status-im/status-go/issues/1520.
@cammellos suggested that we need to implement the ENS verification process asynchronously so that we don't delay message retrieval. That is the ideal solution but I'm unsure of the impact that'll have on the UI layer in status-react (cc @yenda @flexsurfer)
For an async workflow, the following needs to happen:
statusMessageHandler
should have access to a cache service which can return whether an ENS name is valid or not. This can return synchronously if it was cached, or through a channel if a network call to the ENS contract needs to take place.statusMessageHandler
returns the message with an additional flag indicating whether the name isunknown
(no verification has yet taken place),valid
,invalid
(name does not match), orerror
(e.g. ENS network call error)Messenger
object) that the name was checked together with the result of the check. It will also somehow store this information in a db, together with the timestamp, so we can invalidate this information periodically.Messenger
will advertise the results to its consumer app, which will update the UI accordingly.Right now I don't see a
name
field instatusMessageHandler
that I can use to query the ENS contract: https://github.com/status-im/status-protocol-go/blob/cc44ddb7ce44a4203f1af444bcb5f9af3331cdb1/v1/decoder.go#L76-L82Please let me know your thoughts, before proceeding on this.