From c61cf4e1b2ff53ee58a4049f848b41873764b267 Mon Sep 17 00:00:00 2001 From: Michele Balistreri Date: Tue, 3 Aug 2021 20:10:16 +0300 Subject: [PATCH] re-apply signTypedData fix (#2297) --- VERSION | 2 +- go.mod | 2 +- go.sum | 4 ++-- .../ethereum/go-ethereum/common/math/big.go | 21 +++++++++++++++++++ vendor/modules.txt | 2 +- 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 970e801ef..3976f6497 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.83.3 +0.83.4 diff --git a/go.mod b/go.mod index 75e6bbd84..325c4c0eb 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/status-im/status-go go 1.13 -replace github.com/ethereum/go-ethereum v1.10.4 => github.com/status-im/go-ethereum v1.10.4-status.1 +replace github.com/ethereum/go-ethereum v1.10.4 => github.com/status-im/go-ethereum v1.10.4-status.2 replace github.com/Sirupsen/logrus v1.4.2 => github.com/sirupsen/logrus v1.4.2 diff --git a/go.sum b/go.sum index dab890a42..9604632bb 100644 --- a/go.sum +++ b/go.sum @@ -1112,8 +1112,8 @@ github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q github.com/src-d/envconfig v1.0.0/go.mod h1:Q9YQZ7BKITldTBnoxsE5gOeB5y66RyPXeue/R4aaNBc= github.com/status-im/doubleratchet v3.0.0+incompatible h1:aJ1ejcSERpSzmWZBgtfYtiU2nF0Q8ZkGyuEPYETXkCY= github.com/status-im/doubleratchet v3.0.0+incompatible/go.mod h1:1sqR0+yhiM/bd+wrdX79AOt2csZuJOni0nUDzKNuqOU= -github.com/status-im/go-ethereum v1.10.4-status.1 h1:wQOcLgvJIhiB0rxnGQtFOBiy4hOAFrZtM2yhAa9p3Rg= -github.com/status-im/go-ethereum v1.10.4-status.1/go.mod h1:GvIhpdCOgMHI6i5xVPEZOrv/qSMeOFHbZh77AoyZUoE= +github.com/status-im/go-ethereum v1.10.4-status.2 h1:uvcD2U7skYqPQviARFb4w3wZyFSYLs/pfVrJaRSDcCA= +github.com/status-im/go-ethereum v1.10.4-status.2/go.mod h1:GvIhpdCOgMHI6i5xVPEZOrv/qSMeOFHbZh77AoyZUoE= github.com/status-im/go-multiaddr-ethv4 v1.2.0 h1:OT84UsUzTCwguqCpJqkrCMiL4VZ1SvUtH9a5MsZupBk= github.com/status-im/go-multiaddr-ethv4 v1.2.0/go.mod h1:2VQ3C+9zEurcceasz12gPAtmEzCeyLUGPeKLSXYQKHo= github.com/status-im/go-waku v0.0.0-20210711181138-a2ff7f3df962 h1:z1v+E3hRUajYxUcOVu60DOlNCcSmD0HKQQTIUdKeLos= diff --git a/vendor/github.com/ethereum/go-ethereum/common/math/big.go b/vendor/github.com/ethereum/go-ethereum/common/math/big.go index 1af5b4d87..dd17bbe4e 100644 --- a/vendor/github.com/ethereum/go-ethereum/common/math/big.go +++ b/vendor/github.com/ethereum/go-ethereum/common/math/big.go @@ -18,6 +18,7 @@ package math import ( + "encoding/json" "fmt" "math/big" ) @@ -49,6 +50,26 @@ func NewHexOrDecimal256(x int64) *HexOrDecimal256 { return &h } +func (i *HexOrDecimal256) UnmarshalJSON(data []byte) error { + var x int64 + var s string + var b *big.Int + var err error + if err = json.Unmarshal(data, &x); err == nil { + b = big.NewInt(x) + } else if err = json.Unmarshal(data, &s); err == nil { + var ok bool + b, ok = ParseBig256(s) + if !ok { + return fmt.Errorf("invalid hex or decimal integer %q", s) + } + } else { + return err + } + *i = HexOrDecimal256(*b) + return nil +} + // UnmarshalText implements encoding.TextUnmarshaler. func (i *HexOrDecimal256) UnmarshalText(input []byte) error { bigint, ok := ParseBig256(string(input)) diff --git a/vendor/modules.txt b/vendor/modules.txt index e74671eb1..8b4dd66df 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -38,7 +38,7 @@ github.com/edsrzf/mmap-go # github.com/elastic/gosigar v0.14.1 github.com/elastic/gosigar github.com/elastic/gosigar/sys/windows -# github.com/ethereum/go-ethereum v1.10.4 => github.com/status-im/go-ethereum v1.10.4-status.1 +# github.com/ethereum/go-ethereum v1.10.4 => github.com/status-im/go-ethereum v1.10.4-status.2 github.com/ethereum/go-ethereum github.com/ethereum/go-ethereum/accounts github.com/ethereum/go-ethereum/accounts/abi