Make parsing of ETH numeric properties more robust #623

This commit is contained in:
Martin Boehm 2021-06-02 16:51:56 +02:00
parent 248dfce9c1
commit f0fe08a054

View File

@ -124,6 +124,9 @@ func parseErc20NumericProperty(contractDesc bchain.AddressDescriptor, data strin
if has0xPrefix(data) {
data = data[2:]
}
if len(data) > 64 {
data = data[:64]
}
if len(data) == 64 {
var n big.Int
_, ok := n.SetString(data, 16)