Add support for Unstoppable domains #2953
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
This PR adds support for Unstoppable Domain resolution so that users can input a domain such as
brad.cryptoand have the address resolve to a Cardano address. Currently these changes are in the proof of concept state as I would like feedback from the team on these changes in hopes to make this PR as beneficial as possible.This currently works by instantiating a new mobx
@actionobservable onresolveDomain()insource/renderer/app/stores/WalletStore. It resolves the domain to either a Cardano address or an error message only when a.is detected in the reciever field.On the send form I tried my best to match the existing code an return `[false, error.message] in the validator for the reciever field.
Questions:
I have noticed a few places that may be valid for storing the error message translations.
Currently I am referencing messages
/source/common/utils/unsResolution.tsbundled with the logic for resolving domains.Would it be preferred to store these translations with the others designated for the wallet send-form in
source/renderer/app/components/wallet/send-form/messages.ts?I have become aware that CORS will challenge you when running an electron app in dev mode because all calls would then have to be to
localhost. The resolution library makes a call to a contract to resolve the domains located oninfura.io.I tried remedying this temporarily by adding the uris to the webRequest before send headers in
createMainWindowonsource/main/windows/main.ts.Todos
Screenshots
TBD
Testing Checklist
brad.cryptoinstead of a Cardano address..is entered observe that resolution errors are presenting on screen up until the fullbrad.cryptois entered.Review Checklist
Basics
input-output-hk/daedalus-devandinput-output-hk/daedalus-qaassigned as PR reviewersrun Chromaticlabel to PR to trigger the run)release-vNext,feature/bug/chore,WIP)yarn manage:translationsproduces no changes)yarn storybook)yarn.lockfile is updatedCode Quality
Testing
After Review