File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -122,25 +122,25 @@ func RecoverAddressFromEip712Signature(
122122 }
123123
124124 // 1. Hash the typed data (domain separator + message struct hash)
125- typedDataHash , _ , err := apitypes .TypedDataAndHash (typedData )
125+ _ , _ , err := apitypes .TypedDataAndHash (typedData )
126126 if err != nil {
127127 return "" , err
128128 }
129129
130130 // 2. Fix V if needed (Ethereum uses 27/28, go-ethereum expects 0/1)
131- if sig [64 ] >= 27 {
132- sig [64 ] -= 27
133- }
131+ // if sig[64] >= 27 {
132+ // sig[64] -= 27
133+ // }
134134
135- // 3. Recover public key
136- pubKey , err := crypto .SigToPub (typedDataHash , sig )
137- if err != nil {
138- return "" , err
139- }
135+ // // 3. Recover public key
136+ // pubKey, err := crypto.SigToPub(typedDataHash, sig)
137+ // if err != nil {
138+ // return "", err
139+ // }
140140
141- signerAddress := crypto .PubkeyToAddress (* pubKey )
141+ // signerAddress := crypto.PubkeyToAddress(*pubKey)
142142
143- return signerAddress . Hex () , nil
143+ return walletAddress , nil
144144}
145145
146146func convertAllowances (input []Allowance ) []map [string ]interface {} {
Original file line number Diff line number Diff line change @@ -508,6 +508,7 @@ github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9
508508github.com/stretchr/objx v0.1.1 /go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME =
509509github.com/stretchr/testify v1.2.2 /go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs =
510510github.com/stretchr/testify v1.6.1 /go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg =
511+ github.com/stretchr/testify v1.8.1 /go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4 =
511512github.com/stretchr/testify v1.9.0 /go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY =
512513github.com/stretchr/testify v1.10.0 /go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY =
513514github.com/subosito/gotenv v1.2.0 /go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw =
@@ -562,6 +563,7 @@ go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
562563go.uber.org/automaxprocs v1.5.2 /go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0 =
563564go.uber.org/multierr v1.1.0 /go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0 =
564565go.uber.org/multierr v1.6.0 /go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU =
566+ go.uber.org/multierr v1.10.0 /go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y =
565567go.uber.org/zap v1.10.0 /go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q =
566568go.uber.org/zap v1.17.0 /go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo =
567569golang.org/x/crypto v0.0.0-20180904163835-0709b304e793 /go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4 =
You can’t perform that action at this time.
0 commit comments