141141 :items =" getToAddressComboboxItems"
142142 :placeholder =" verifierPlaceholder"
143143 required
144- :rules =" [contactRule, rules.contactRequired, ensRule, unstoppableDomainsRule, bitRule, torusRule]"
144+ :rules =" [contactRule, rules.contactRequired, ensRule, rnsRule, unstoppableDomainsRule, bitRule, torusRule]"
145145 outlined
146146 item-text =" name"
147147 item-value =" value"
@@ -544,6 +544,7 @@ import {
544544 MESSAGE_MODAL_TYPE_SUCCESS ,
545545 OLD_ERC721_LIST ,
546546 REDDIT ,
547+ RNS ,
547548 TRANSACTION_SPEED ,
548549 TWITTER ,
549550 UNSTOPPABLE_DOMAINS ,
@@ -594,6 +595,7 @@ export default {
594595 toAddress: ' ' ,
595596 formValid: false ,
596597 ensError: ' ' ,
598+ rnsError: ' ' ,
597599 bitError: ' ' ,
598600 torusError: ' ' ,
599601 unstoppableDomainsError: ' ' ,
@@ -848,7 +850,7 @@ export default {
848850 this .$vuetify .goTo (0 )
849851 },
850852 methods: {
851- ... mapActions ([' getTorusLookupAddress' , ' getEnsOrUnstoppableAddress' ]),
853+ ... mapActions ([' getTorusLookupAddress' , ' getEnsOrUnstoppableAddress' , ' getRnsAddress ' ]),
852854 startQrScanning () {
853855 this .camera = ' auto'
854856 this .showQrScanner = true
@@ -862,6 +864,8 @@ export default {
862864 this .selectedVerifier = GOOGLE
863865 } else if (/ . eth$ / .test (toAddress) || / . xyz$ / .test (toAddress) || / . kred$ / i .test (toAddress)) {
864866 this .selectedVerifier = ENS
867+ } else if (/ . rsk$ / .test (toAddress)) {
868+ this .selectedVerifier = RNS
865869 } else if (/ . crypto$ / .test (toAddress)) {
866870 this .selectedVerifier = UNSTOPPABLE_DOMAINS
867871 } else if (new RegExp (` ${ this .bitTail } $` ).test (toAddress)) {
@@ -971,6 +975,9 @@ export default {
971975 ensRule () {
972976 return this .selectedVerifier === ENS && this .ensError ? this .ensError : true
973977 },
978+ rnsRule () {
979+ return this .selectedVerifier === RNS && this .rnsError ? this .rnsError : true
980+ },
974981 bitRule () {
975982 return this .selectedVerifier === BIT && this .bitError ? this .bitError : true
976983 },
@@ -1085,6 +1092,7 @@ export default {
10851092 }
10861093 }
10871094 this .ensError = ' '
1095+ this .rnsError = ' '
10881096 this .unstoppableDomainsError = ' '
10891097 this .torusError = ' '
10901098
@@ -1233,6 +1241,17 @@ export default {
12331241 this .ensError = ' walletSettings.invalidEns'
12341242 this .$refs .form .validate ()
12351243 }
1244+ } else if (this .selectedVerifier === RNS ) {
1245+ try {
1246+ const res = await this .getRnsAddress ({ domain: this .toAddress , chainType: this .networkType .type , coinType: this .networkType .ticker })
1247+ log .info (res)
1248+ toAddress = res .toLowerCase ()
1249+ this .rnsError = ' '
1250+ } catch (error) {
1251+ log .error (error)
1252+ this .rnsError = ' walletSettings.invalidRns'
1253+ }
1254+ this .$refs .form .validate ()
12361255 } else if (this .selectedVerifier === UNSTOPPABLE_DOMAINS ) {
12371256 try {
12381257 const res = await this .getUnstoppableDomains (this .toAddress )
0 commit comments