Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
88599b1c
Unverified
Commit
88599b1c
authored
Mar 04, 2023
by
Michael de Hoog
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-signer: fix address comparison
parent
480fe38f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
signature.go
op-service/crypto/signature.go
+2
-1
No files found.
op-service/crypto/signature.go
View file @
88599b1c
package
crypto
package
crypto
import
(
import
(
"bytes"
"context"
"context"
"crypto/ecdsa"
"crypto/ecdsa"
"errors"
"errors"
...
@@ -56,7 +57,7 @@ func SignerFactoryFromConfig(l log.Logger, privateKey, mnemonic, hdPath string,
...
@@ -56,7 +57,7 @@ func SignerFactoryFromConfig(l log.Logger, privateKey, mnemonic, hdPath string,
fromAddress
=
common
.
HexToAddress
(
signerConfig
.
Address
)
fromAddress
=
common
.
HexToAddress
(
signerConfig
.
Address
)
signer
=
func
(
chainID
*
big
.
Int
)
SignerFn
{
signer
=
func
(
chainID
*
big
.
Int
)
SignerFn
{
return
func
(
ctx
context
.
Context
,
address
common
.
Address
,
tx
*
types
.
Transaction
)
(
*
types
.
Transaction
,
error
)
{
return
func
(
ctx
context
.
Context
,
address
common
.
Address
,
tx
*
types
.
Transaction
)
(
*
types
.
Transaction
,
error
)
{
if
address
.
String
()
!=
signerConfig
.
Address
{
if
!
bytes
.
Equal
(
address
[
:
],
fromAddress
[
:
])
{
return
nil
,
fmt
.
Errorf
(
"attempting to sign for %s, expected %s: "
,
address
,
signerConfig
.
Address
)
return
nil
,
fmt
.
Errorf
(
"attempting to sign for %s, expected %s: "
,
address
,
signerConfig
.
Address
)
}
}
return
signerClient
.
SignTransaction
(
ctx
,
chainID
,
tx
)
return
signerClient
.
SignTransaction
(
ctx
,
chainID
,
tx
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment