diff options
author | Martin Holst Swende <martin@swende.se> | 2019-06-03 22:56:05 +0800 |
---|---|---|
committer | Guillaume Ballet <gballet@gmail.com> | 2019-06-03 22:56:05 +0800 |
commit | 17381ecc6695ea9c2d8e5ee0aee5cf70d59a301a (patch) | |
tree | fda58619a484ec51368859549718a0032567d455 /common/math | |
parent | 7a22da98b9f81d206eb65d1fa4f5e773d888bac3 (diff) | |
download | go-tangerine-17381ecc6695ea9c2d8e5ee0aee5cf70d59a301a.tar go-tangerine-17381ecc6695ea9c2d8e5ee0aee5cf70d59a301a.tar.gz go-tangerine-17381ecc6695ea9c2d8e5ee0aee5cf70d59a301a.tar.bz2 go-tangerine-17381ecc6695ea9c2d8e5ee0aee5cf70d59a301a.tar.lz go-tangerine-17381ecc6695ea9c2d8e5ee0aee5cf70d59a301a.tar.xz go-tangerine-17381ecc6695ea9c2d8e5ee0aee5cf70d59a301a.tar.zst go-tangerine-17381ecc6695ea9c2d8e5ee0aee5cf70d59a301a.zip |
core/signer, clef: improve ui-test flow, fix errors in uint handling (#19584)
* core/signer, clef: improve ui-test flow, fix errors in uint handling for eip-712
* core/signer: add fuzzer testcases + crashfixes
* signer: address review concerns, check sign in integer parsing
Diffstat (limited to 'common/math')
-rw-r--r-- | common/math/big.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/math/big.go b/common/math/big.go index 9d2e7946d..d31c59af1 100644 --- a/common/math/big.go +++ b/common/math/big.go @@ -42,6 +42,13 @@ const ( // HexOrDecimal256 marshals big.Int as hex or decimal. type HexOrDecimal256 big.Int +// NewHexOrDecimal256 creates a new HexOrDecimal256 +func NewHexOrDecimal256(x int64) *HexOrDecimal256 { + b := big.NewInt(x) + h := HexOrDecimal256(*b) + return &h +} + // UnmarshalText implements encoding.TextUnmarshaler. func (i *HexOrDecimal256) UnmarshalText(input []byte) error { bigint, ok := ParseBig256(string(input)) |