Don't open the domain name for the cert used to sign the current TokenScript file if it's a wildcard

pull/1335/head
Hwee-Boon Yar 5 years ago
parent 924e84cc31
commit 2e65203314
  1. 6
      AlphaWallet/Tokens/ViewControllers/VerifiableStatusViewController.swift

@ -84,7 +84,11 @@ func createTokenScriptFileStatusButton(withStatus status: TokenLevelTokenScriptD
case .type1GoodTokenScriptSignatureGoodOrOptional(let isDebugMode, let isSigned, let domain, let rawMessage):
let message: String
if let domain = domain {
button.handler = { urlOpener in URL(string: "https://\(domain)").flatMap { urlOpener.open(url: $0) } }
button.handler = { urlOpener in
if !domain.starts(with: "*.") {
URL(string: "https://\(domain)").flatMap { urlOpener.open(url: $0) }
}
}
message = "\(rawMessage) by \(domain)"
} else {
message = rawMessage

Loading…
Cancel
Save