From 518b14aa39c0a8d1b08001abee66f5e0d7b346ac Mon Sep 17 00:00:00 2001 From: Miguel Mota Date: Fri, 25 Jun 2021 17:25:39 -0700 Subject: [PATCH] Move base fee parameter to end --- hdwallet.go | 6 +++--- hdwallet_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hdwallet.go b/hdwallet.go index 66684ba..f66e2b8 100644 --- a/hdwallet.go +++ b/hdwallet.go @@ -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() @@ -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() @@ -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) } diff --git a/hdwallet_test.go b/hdwallet_test.go index 73674a2..edee3b5 100644 --- a/hdwallet_test.go +++ b/hdwallet_test.go @@ -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) }