Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SIP-12 (Domain Resolution) #103

hmalik88 started this conversation in General
Jul 18, 2023 · 1 comments · 3 replies
Discussion options

This thread is intended for discussion regarding the addition of a name resolution API.

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

@hmalik88 @matthewwalsh0 As currently implemented if the domain does not match the ENS character standard as defined in export function isValidDomainName(address) the Extension shows INVALID_RECIPIENT_ADDRESS_ERROR instead, even if OnNameLookupHandler resolves to valid public address.

Different naming systems may support different character sets and formats. For example FIO Protocol follows something@something format, which would not be supported by existing implementation:

image

image

Recommendation:
This can be corrected by implementing one of below:

  1. Remove isValidDomainName altogether and move ENS domain validation to the ENS resolver.
  2. Suppress INVALID_RECIPIENT_ADDRESS_ERROR if OnNameLookupHandler returns valid public address.
You must be logged in to vote
3 replies
Comment options

hmalik88 Jan 4, 2024
Collaborator Author

Hi Pawel,

Removing isValidDomainName altogether is not a route we can take. Doing so would mean a lot of unnecessary computation in the extension. Instead, we are allowing for snaps to state their TLDs and thinking of allowing for stating of non-TLD domains to be referenced through some prefix scheme in the input e.g. fio:pawel@edge.

Comment options

@hmalik88 Thanks. That's fine, the problem is that INVALID_RECIPIENT_ADDRESS_ERROR hides the resolution suggestion (see screen shots above) because the "domain" has invalid format, so there's got to be a way to suppress it otherwise the user will not see the address resolved by the SNAP.

As to stating a format of resolution SNAP supports would be great, maybe via regex. We were thinking of doing that check in the SNAP anyway as to not run RPC calls for names that do not fit the format.

Comment options

hmalik88 Jan 4, 2024
Collaborator Author

Yes, we will fix that. This is priority for us in our coming sprint, so I'll ping you once we've merged changes 🙂 -- thanks for your input!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /