web3dart
web3dart copied to clipboard
hexToInt raises exception on null string or "0x".
When hex string is null string or 0x hexToInt raises exception. So, hexToInt should be changed like the following.
///Takes the hexadecimal input and creates a [BigInt].
BigInt hexToInt(String hex) {
if (hex == '' || hex == '0x') return BigInt.from(0);
return BigInt.parse(strip0x(hex), radix: 16);
}
@aegisdino Please create a PR