From b0423d93938280c1e5cc1714f9ecdec26e80b103 Mon Sep 17 00:00:00 2001 From: wannabit-yongjoo Date: Tue, 19 Oct 2021 20:06:31 +0900 Subject: [PATCH] [iOS Bugfix] iov starname regular ex update --- .../Main/starname/StarNameListViewController.swift | 4 ++-- Cosmos-IOS/Cosmostation/Cosmostation/Dao/Param.swift | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) 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)