Open djalfirevic opened 4 years ago
Is there any method where you can post a string, and that it returns whether this is a valid address or not?
I've tried to use something like this
private func isValidAddress() -> Bool { if let _ = try? BitcoinAddress(cashaddr: address) { return true } else if let _ = try? BitcoinAddress(legacy: address) { return true } return true }
Thats actually the correct way of validating an address. Only I would change the last return and actually pass the address 😜
return
Is there any method where you can post a string, and that it returns whether this is a valid address or not?
I've tried to use something like this