validateAddress function
- required String address,
- required CoinEntity token,
Returns null if the address is valid, otherwise returns an AddressError
Implementation
AddressError? validateAddress({
required String address,
required CoinEntity token,
}) {
return switch (token) {
_ when token.isUTXO =>
validateUTXOAddress(address: address, token: token).$1,
tron => validateTronAddress(address: address),
_ => validateEVMAddress(address: address),
};
}