Commit 151f9c7f authored by obscuren's avatar obscuren

BigInt accept string

parent 80261c80
...@@ -118,6 +118,8 @@ func (val *Value) BigInt() *big.Int { ...@@ -118,6 +118,8 @@ func (val *Value) BigInt() *big.Int {
return b return b
} else if a, ok := val.Val.(*big.Int); ok { } else if a, ok := val.Val.(*big.Int); ok {
return a return a
} else if a, ok := val.Val.(string); ok {
return Big(a)
} else { } else {
return big.NewInt(int64(val.Uint())) return big.NewInt(int64(val.Uint()))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment