stringToAddress function
Implementation
Uint8List stringToAddress(String encoded) {
if (_constants['sizes']!['symbolAddressEncoded'] == encoded.length) {
var bytes = base32.decode(encoded + 'A');
return Uint8List.fromList(
bytes.sublist(0, _constants['sizes']!['symbolAddressDecoded']));
}
if (_constants['sizes']!['nemAddressEncoded'] == encoded.length) {
return utf8ToBytes(encoded);
}
throw Exception('$encoded does not represent a valid encoded address');
}