Following best practices ensures a cohesive ecosystem experience for everyone.
The Handle Standard goes beyond the NFT metadata for each Handle and includes the best practices that follow. dApp developers should uphold the best practices outlined below when querying and displaying Handles to their users, further increasing the value of a standard across the ecosystem.
-
Do not rely solely on "debounce" techniques to resolve a $handle. This often resolves $handles incorrectly if the user continues typing after a debounce and the prior HTTP request is delayed. Instead, we’d prefer an explicit user action that indicates they are finished typing, like the "Enter" or "Tab" keys, clicking a button, or the input field "blur" event. If a "debounce" is used, then it should be double-checked after an explicit user action has taken place.
-
Disable browser autofill on address input fields. Sometimes users inadvertently select autofill values from the browser if they are enabled. This can lead to unintended transactions.
-
Have a visual display that the correct $handle was resolved. This can come in two forms (our favorite is both):
-
Repeat / Redisplay back to the user the $handle your code resolved. This acts as a confirmation that you resolved the $handle they expected you to.
-
Display the $handle NFT image as another form of confirmation to the user that the correct $handle was resolved.
-
-
Display a warning message if a $handle resolves to a script address. ESPECIALLY if there is no datum attached. Unless it is a multi-sig address, this is most certainly unwanted.
-
On transaction review pages, reiterate the $handle name and/or NFT image, along with the address.