Introduce helper field on Field interface to show a subtle note about the resolved address.
Add TNS name resolver to 3 pages:
Send token (src/post/hooks/wallet/useSend.ts)
Community Pool Spend Proposal (src/post/hooks/gov/usePropose.ts)
Sign-in with address (src/hooks/auth/useSignInWithAddress.ts)
Since the validation function in useForm only supports synchronous function, TNS name resolution logic is done outside the useForm scope. Hence, useTns hook is introduced.
Add TNS name error This name has not yet been configured and other languages translation.
Test cases
Fill in blossom.ust, it should resolve to an address terra1...9hthwzp (Like above image)
Fill in axfkcsnjr.ust, it should show This name has not yet been configured validation error message.
Changes
helper
field onField
interface to show a subtle note about the resolved address.src/post/hooks/wallet/useSend.ts
)src/post/hooks/gov/usePropose.ts
)src/hooks/auth/useSignInWithAddress.ts
)useForm
only supports synchronous function, TNS name resolution logic is done outside theuseForm
scope. Hence,useTns
hook is introduced.This name has not yet been configured
and other languages translation.Test cases
blossom.ust
, it should resolve to an addressterra1...9hthwzp
(Like above image)axfkcsnjr.ust
, it should showThis name has not yet been configured
validation error message.Expected Behavior
Send token
Community Pool Spend Proposal
Sign-in with address