Skip to content

Commit

Permalink
fix: review of variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptiste Boussemart committed Aug 31, 2021
1 parent f2e60a6 commit 7897ab3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions accounts/abi/bind/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ func NewTransactor(keyin io.Reader, passphrase string) (*TransactOpts, error) {
// Deprecated: Use NewKeyStoreTransactorWithChainID instead.
func NewKeyStoreTransactor(keystore *keystore.KeyStore, account accounts.Account) (*TransactOpts, error) {
log.Warn("WARNING: NewKeyStoreTransactor has been deprecated in favour of NewTransactorWithChainID")
var Signer types.Signer = types.HomesteadSigner{}
var homesteadSigner types.Signer = types.HomesteadSigner{}
return &TransactOpts{
From: account.Address,
Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) {
if address != account.Address {
return nil, ErrNotAuthorized
}
// Quorum
signer := Signer
signer := homesteadSigner
if tx.IsPrivate() {
signer = types.QuorumPrivateTxSigner{}
}
Expand All @@ -90,15 +90,15 @@ func NewKeyStoreTransactor(keystore *keystore.KeyStore, account accounts.Account
func NewKeyedTransactor(key *ecdsa.PrivateKey) *TransactOpts {
log.Warn("WARNING: NewKeyedTransactor has been deprecated in favour of NewKeyedTransactorWithChainID")
keyAddr := crypto.PubkeyToAddress(key.PublicKey)
var Signer types.Signer = types.HomesteadSigner{}
var homesteadSigner types.Signer = types.HomesteadSigner{}
return &TransactOpts{
From: keyAddr,
Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) {
if address != keyAddr {
return nil, ErrNotAuthorized
}
// Quorum
signer := Signer
signer := homesteadSigner
if tx.IsPrivate() {
signer = types.QuorumPrivateTxSigner{}
}
Expand Down Expand Up @@ -132,15 +132,15 @@ func NewKeyStoreTransactorWithChainID(keystore *keystore.KeyStore, account accou
if chainID == nil {
return nil, ErrNoChainID
}
var Signer types.Signer = types.NewEIP155Signer(chainID)
var eipo155Signer types.Signer = types.NewEIP155Signer(chainID)
return &TransactOpts{
From: account.Address,
Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) {
if address != account.Address {
return nil, ErrNotAuthorized
}
// Quorum
signer := Signer
signer := eipo155Signer
if tx.IsPrivate() {
signer = types.QuorumPrivateTxSigner{}
}
Expand All @@ -161,15 +161,15 @@ func NewKeyedTransactorWithChainID(key *ecdsa.PrivateKey, chainID *big.Int) (*Tr
if chainID == nil {
return nil, ErrNoChainID
}
var Signer types.Signer = types.NewEIP155Signer(chainID)
var eipo155Signer types.Signer = types.NewEIP155Signer(chainID)
return &TransactOpts{
From: keyAddr,
Signer: func(address common.Address, tx *types.Transaction) (*types.Transaction, error) {
if address != keyAddr {
return nil, ErrNotAuthorized
}
// Quorum
signer := Signer
signer := eipo155Signer
if tx.IsPrivate() {
signer = types.QuorumPrivateTxSigner{}
}
Expand Down

0 comments on commit 7897ab3

Please sign in to comment.