diff --git a/Cosmos-IOS/Cosmostation/Cosmostation/Controller/Main/starname/StarNameListViewController.swift b/Cosmos-IOS/Cosmostation/Cosmostation/Controller/Main/starname/StarNameListViewController.swift index cb62bec60..ac835aeda 100644 --- a/Cosmos-IOS/Cosmostation/Cosmostation/Controller/Main/starname/StarNameListViewController.swift +++ b/Cosmos-IOS/Cosmostation/Cosmostation/Controller/Main/starname/StarNameListViewController.swift @@ -55,13 +55,13 @@ class StarNameListViewController: BaseViewController { extension WUtils { static func isStarnameValidStarName(_ starname: String) -> Bool { - let starNameRegEx = "[0-9a-z.-]{0,64}+\\*[a-z0-9.-]{3,16}" + let starNameRegEx = "[0-9a-z.-]{0,64}+\\*[a-z0-9.-]{2,16}" let starNamePred = NSPredicate(format:"SELF MATCHES %@", starNameRegEx) return starNamePred.evaluate(with: starname) } static func isStarnameValidDomain(_ starname: String) -> Bool { - let starNameRegEx = "[a-z0-9]{4,32}" + let starNameRegEx = "[a-z0-9]{2,32}" let starNamePred = NSPredicate(format:"SELF MATCHES %@", starNameRegEx) return starNamePred.evaluate(with: starname) } diff --git a/Cosmos-IOS/Cosmostation/Cosmostation/Dao/Param.swift b/Cosmos-IOS/Cosmostation/Cosmostation/Dao/Param.swift index d23e4cc34..4eb1e654a 100644 --- a/Cosmos-IOS/Cosmostation/Cosmostation/Dao/Param.swift +++ b/Cosmos-IOS/Cosmostation/Cosmostation/Dao/Param.swift @@ -232,6 +232,11 @@ public struct Params { self.band_active_validators = BandOrcleActiveValidators.init(rawActiveValidators) } + if let rawStarnameDomains = dictionary?["starname_domains"] as? Array { + for rawStarnameDomain in rawStarnameDomains { + self.starname_domains.append(rawStarnameDomain) + } + } if let rawGovTallying = dictionary?["gov_tallying"] as? NSDictionary { self.gov_tallying = GovTallying.init(rawGovTallying)