mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
Fixed breaking changes
This commit is contained in:
parent
c182e18fb3
commit
39317d03b4
2 changed files with 12 additions and 4 deletions
|
|
@ -169,7 +169,7 @@ func (api *SignerAPI) determineSignatureFormat(contentType string, addr common.M
|
||||||
}
|
}
|
||||||
sighash, msg := SignTextValidator(validatorData)
|
sighash, msg := SignTextValidator(validatorData)
|
||||||
message := []*NameValueType{
|
message := []*NameValueType{
|
||||||
&NameValueType{
|
{
|
||||||
Name: "message",
|
Name: "message",
|
||||||
Typ: "text",
|
Typ: "text",
|
||||||
Value: msg,
|
Value: msg,
|
||||||
|
|
@ -191,7 +191,7 @@ func (api *SignerAPI) determineSignatureFormat(contentType string, addr common.M
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
message := []*NameValueType{
|
message := []*NameValueType{
|
||||||
&NameValueType{
|
{
|
||||||
Name: "Clique block",
|
Name: "Clique block",
|
||||||
Typ: "clique",
|
Typ: "clique",
|
||||||
Value: fmt.Sprintf("clique block %d [0x%x]", header.Number, header.Hash()),
|
Value: fmt.Sprintf("clique block %d [0x%x]", header.Number, header.Hash()),
|
||||||
|
|
@ -207,7 +207,7 @@ func (api *SignerAPI) determineSignatureFormat(contentType string, addr common.M
|
||||||
}
|
}
|
||||||
sighash, msg := SignTextPlain(plainData)
|
sighash, msg := SignTextPlain(plainData)
|
||||||
message := []*NameValueType{
|
message := []*NameValueType{
|
||||||
&NameValueType{
|
{
|
||||||
Name: "message",
|
Name: "message",
|
||||||
Typ: "text/plain",
|
Typ: "text/plain",
|
||||||
Value: msg,
|
Value: msg,
|
||||||
|
|
|
||||||
|
|
@ -642,9 +642,17 @@ function ApproveSignData(r){
|
||||||
addr, _ := mixAddr("0x694267f14675d7e1b9494fd8d72fefe1755710fa")
|
addr, _ := mixAddr("0x694267f14675d7e1b9494fd8d72fefe1755710fa")
|
||||||
|
|
||||||
fmt.Printf("address %v %v\n", addr.String(), addr.Original())
|
fmt.Printf("address %v %v\n", addr.String(), addr.Original())
|
||||||
|
|
||||||
|
nvt := []*core.NameValueType{
|
||||||
|
{
|
||||||
|
Name: "message",
|
||||||
|
Typ: "text/plain",
|
||||||
|
Value: msg,
|
||||||
|
},
|
||||||
|
}
|
||||||
resp, err := r.ApproveSignData(&core.SignDataRequest{
|
resp, err := r.ApproveSignData(&core.SignDataRequest{
|
||||||
Address: *addr,
|
Address: *addr,
|
||||||
Message: msg,
|
Message: nvt,
|
||||||
Hash: hash,
|
Hash: hash,
|
||||||
Meta: core.Metadata{Remote: "remoteip", Local: "localip", Scheme: "inproc"},
|
Meta: core.Metadata{Remote: "remoteip", Local: "localip", Scheme: "inproc"},
|
||||||
Rawdata: raw,
|
Rawdata: raw,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue