Skip to content

Commit

Permalink
[iOS Bugfix] iov starname regular ex update
Browse files Browse the repository at this point in the history
  • Loading branch information
wannabit-yongjoo committed Oct 19, 2021
1 parent 29bd5b5 commit b0423d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions Cosmos-IOS/Cosmostation/Cosmostation/Dao/Param.swift
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ public struct Params {
self.band_active_validators = BandOrcleActiveValidators.init(rawActiveValidators)
}

if let rawStarnameDomains = dictionary?["starname_domains"] as? Array<String> {
for rawStarnameDomain in rawStarnameDomains {
self.starname_domains.append(rawStarnameDomain)
}
}

if let rawGovTallying = dictionary?["gov_tallying"] as? NSDictionary {
self.gov_tallying = GovTallying.init(rawGovTallying)
Expand Down

0 comments on commit b0423d9

Please sign in to comment.