Skip to content

Commit

Permalink
waas: sign message change (#20)
Browse files Browse the repository at this point in the history
* waas: sign message change

* waas: sign message change
  • Loading branch information
marino39 authored Feb 16, 2024
1 parent a7b4afb commit 80f65eb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21.5

require (
github.com/0xsequence/ethkit v1.22.4
github.com/0xsequence/go-sequence v0.25.1-0.20240215085151-03a5ef4a2143
github.com/0xsequence/go-sequence v0.25.1-0.20240216130731-cc4e560c3e52
github.com/0xsequence/nitrocontrol v0.3.0
github.com/BurntSushi/toml v1.3.2
github.com/aws/aws-sdk-go-v2 v1.24.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ github.com/0xsequence/ethkit v1.22.4 h1:hd6DYnQ/8l1mC7ZcUOyYlD3pgCfKKAClkrtpU2hO
github.com/0xsequence/ethkit v1.22.4/go.mod h1:wBcLTM7WpGCJnQyYUvUIRLbjurDrkSMHCKuOu/rylro=
github.com/0xsequence/go-ethauth v0.13.0 h1:ZaqFEEqy574A2b1P7vjpcy5tb4W/izn+A3swwOYi9wA=
github.com/0xsequence/go-ethauth v0.13.0/go.mod h1:f3kx39S9F+W+qvZEB6bkKKbpUstmyB7goUntO3wvlhg=
github.com/0xsequence/go-sequence v0.25.1-0.20240215085151-03a5ef4a2143 h1:gobYr+Ss6WrQkBD/8dg3Cp7OBpj6lhDVIFM/MEw8ybo=
github.com/0xsequence/go-sequence v0.25.1-0.20240215085151-03a5ef4a2143/go.mod h1:De76GvRmR+zFnbpe8c5l9iTe9Hgs1Bc7WIZem4XdEq8=
github.com/0xsequence/go-sequence v0.25.1-0.20240216130731-cc4e560c3e52 h1:KOMKfE2Bly4mMW8ddTSoBCe2Jkz7pf7T5oUpvsDdMjo=
github.com/0xsequence/go-sequence v0.25.1-0.20240216130731-cc4e560c3e52/go.mod h1:De76GvRmR+zFnbpe8c5l9iTe9Hgs1Bc7WIZem4XdEq8=
github.com/0xsequence/nitrocontrol v0.3.0 h1:D0/gX576zQhitrJnBfBrOFFufEOzh6f2jO/+2ynwIUA=
github.com/0xsequence/nitrocontrol v0.3.0/go.mod h1:sTG5akVPzoVr3unv/7h9aZGaT+BVGmvUMOdwXFeIEEA=
github.com/0xsequence/nsm v0.1.0 h1:gVOViRWPUW/c5VEmGy2gCw1az/nqP3gY7VD9V2+069k=
Expand Down
5 changes: 4 additions & 1 deletion rpc/sign_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ func (s *RPC) signMessage(
return nil, fmt.Errorf("recovering parent wallet: %w", err)
}

// Make sure the message is EIP191 encoded
msgBytes := sequence.MessageToEIP191(common.FromHex(intent.Data.Message))

// Validate that message match intent
digest := sequence.MessageDigest(common.FromHex(intent.Data.Message))
digest := sequence.MessageDigest(msgBytes)

chainID, ok := sequence.ParseHexOrDec(intent.Data.Network)
if !ok {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ github.com/0xsequence/ethkit/go-ethereum/rpc
# github.com/0xsequence/go-ethauth v0.13.0
## explicit; go 1.17
github.com/0xsequence/go-ethauth
# github.com/0xsequence/go-sequence v0.25.1-0.20240215085151-03a5ef4a2143
# github.com/0xsequence/go-sequence v0.25.1-0.20240216130731-cc4e560c3e52
## explicit; go 1.18
github.com/0xsequence/go-sequence
github.com/0xsequence/go-sequence/contracts
Expand Down

0 comments on commit 80f65eb

Please sign in to comment.