-
Notifications
You must be signed in to change notification settings - Fork 18
-
This thread is intended for discussion regarding the addition of a name resolution API.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 3 replies
-
@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:
Recommendation:
This can be corrected by implementing one of below:
- Remove isValidDomainName altogether and move ENS domain validation to the ENS resolver.
- Suppress INVALID_RECIPIENT_ADDRESS_ERROR if OnNameLookupHandler returns valid public address.
Beta Was this translation helpful? Give feedback.
All reactions
-
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.
Beta Was this translation helpful? Give feedback.
All reactions
-
@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.
Beta Was this translation helpful? Give feedback.
All reactions
-
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!
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1