re-apply signTypedData fix (#2297)
This commit is contained in:
parent
c35ceff06e
commit
c61cf4e1b2
2
go.mod
2
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
|
||||
|
||||
|
|
4
go.sum
4
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=
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue