Add address checking in EthereumAddressRule

pull/2/head
Michael Scoff 7 years ago
parent d63af06923
commit f19f1b725a
  1. 2
      Trust/UI/Form/EthereumAddressRule.swift

@ -14,7 +14,7 @@ public struct EthereumAddressRule<T: Equatable>: RuleType {
public func isValid(value: T?) -> ValidationError? {
if let str = value as? String {
return (str.count != 42) ? validationError : nil
return CryptoAddressValidator.isValidAddress(str) ? validationError : nil
}
return value != nil ? nil : validationError
}

Loading…
Cancel
Save