Skip to content

Commit

Permalink
Move base fee parameter to end
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmota committed Jun 26, 2021
1 parent 09fbe23 commit 518b14a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions hdwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func (w *Wallet) SignHash(account accounts.Account, hash []byte) ([]byte, error)
}

// SignTxEIP155 implements accounts.Wallet, which allows the account to sign an ERC-20 transaction.
func (w *Wallet) SignTxEIP155(account accounts.Account, tx *types.Transaction, baseFee, chainID *big.Int) (*types.Transaction, error) {
func (w *Wallet) SignTxEIP155(account accounts.Account, tx *types.Transaction, chainID, baseFee *big.Int) (*types.Transaction, error) {
w.stateLock.RLock() // Comms have own mutex, this is for the state fields
defer w.stateLock.RUnlock()

Expand Down Expand Up @@ -265,7 +265,7 @@ func (w *Wallet) SignTxEIP155(account accounts.Account, tx *types.Transaction, b
}

// SignTx implements accounts.Wallet, which allows the account to sign an Ethereum transaction.
func (w *Wallet) SignTx(account accounts.Account, tx *types.Transaction, baseFee, chainID *big.Int) (*types.Transaction, error) {
func (w *Wallet) SignTx(account accounts.Account, tx *types.Transaction, chainID, baseFee *big.Int) (*types.Transaction, error) {
w.stateLock.RLock() // Comms have own mutex, this is for the state fields
defer w.stateLock.RUnlock()

Expand Down Expand Up @@ -308,7 +308,7 @@ func (w *Wallet) SignHashWithPassphrase(account accounts.Account, passphrase str

// SignTxWithPassphrase implements accounts.Wallet, attempting to sign the given
// transaction with the given account using passphrase as extra authentication.
func (w *Wallet) SignTxWithPassphrase(account accounts.Account, passphrase string, tx *types.Transaction, baseFee, chainID *big.Int) (*types.Transaction, error) {
func (w *Wallet) SignTxWithPassphrase(account accounts.Account, passphrase string, tx *types.Transaction, chainID, baseFee *big.Int) (*types.Transaction, error) {
return w.SignTx(account, tx, baseFee, chainID)
}

Expand Down
2 changes: 1 addition & 1 deletion hdwallet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func TestWallet(t *testing.T) {
t.Error("expected match")
}

signedTx3, err := wallet.SignTxEIP155(account, tx, big.NewInt(41), big.NewInt(42))
signedTx3, err := wallet.SignTxEIP155(account, tx, big.NewInt(42), big.NewInt(10))
if err != nil {
t.Error(err)
}
Expand Down

0 comments on commit 518b14a

Please sign in to comment.