Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
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
vicotor
mybee
Commits
4af6d90c
Unverified
Commit
4af6d90c
authored
Jun 25, 2021
by
Ralph Pichler
Committed by
GitHub
Jun 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: verify signer result (#2214)
parent
3d9bcfd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
clef.go
pkg/crypto/clef/clef.go
+11
-1
No files found.
pkg/crypto/clef/clef.go
View file @
4af6d90c
...
...
@@ -7,6 +7,7 @@ package clef
import
(
"crypto/ecdsa"
"errors"
"fmt"
"math/big"
"os"
"path/filepath"
...
...
@@ -129,7 +130,16 @@ func (c *clefSigner) Sign(data []byte) ([]byte, error) {
// SignTx signs an ethereum transaction.
func
(
c
*
clefSigner
)
SignTx
(
transaction
*
types
.
Transaction
,
chainID
*
big
.
Int
)
(
*
types
.
Transaction
,
error
)
{
// chainId is nil here because it is set on the clef side
return
c
.
clef
.
SignTx
(
c
.
account
,
transaction
,
nil
)
tx
,
err
:=
c
.
clef
.
SignTx
(
c
.
account
,
transaction
,
nil
)
if
err
!=
nil
{
return
nil
,
err
}
if
chainID
.
Cmp
(
tx
.
ChainId
())
!=
0
{
return
nil
,
fmt
.
Errorf
(
"misconfigured signer: wrong chain id %d; wanted %d"
,
tx
.
ChainId
(),
chainID
)
}
return
tx
,
nil
}
// EthereumAddress returns the ethereum address this signer uses.
...
...
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