Skip to content

Commit

Permalink
wip: update message signer
Browse files Browse the repository at this point in the history
  • Loading branch information
boodyvo committed Nov 1, 2024
1 parent 8661160 commit 16c3e6b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions x/evm/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,6 @@ func GetSigners(msg protov2.Message) ([][]byte, error) {
if err != nil {
fmt.Println("Eth message tryingTypeAnyV1 error", err)
}
msgEthTx, is := tryingTypeAnyV1.(*MsgEthereumTx)
if !is {
fmt.Println("Eth message tryingTypeAnyV1 is not MsgEthereumTx")
//return nil, fmt.Errorf("invalid type, expected MsgEthereumTx and got %T", msg)
}

var data TxData
switch {
Expand Down Expand Up @@ -431,6 +426,14 @@ func GetSigners(msg protov2.Message) ([][]byte, error) {
if err != nil {
fmt.Println("Eth message tryingTypeAnyV1 MsgEthereumTx data error", err)
}

sender, err := msgEthTx.GetSender(data.GetChainID())
if err != nil {
return nil, err
}

signer := sdk.AccAddress(sender.Bytes())
return [][]byte{signer}, nil
default:
fmt.Println("Eth message tryingTypeAnyV1 unknown")
}
Expand Down

0 comments on commit 16c3e6b

Please sign in to comment.