Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
add context
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffprestes committed Jul 6, 2021
1 parent c935400 commit 337da19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eth/ethereum.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,7 @@ func (c *EthereumClient) NewAuth() (*bind.TransactOpts, error) {
// CallAuth performs a Smart Contract method call that requires authorization.
// This call requires a valid account with Ether that can be spend during the
// call.
func (c *EthereumClient) CallAuth(gasLimit uint64,
fn func(*ethclient.Client, *bind.TransactOpts) (*types.Transaction, error)) (*types.Transaction,
func (c *EthereumClient) CallAuth(gasLimit uint64, fn func(*ethclient.Client, *bind.TransactOpts) (*types.Transaction, error)) (*types.Transaction,
error) {
if c.account == nil {
return nil, tracerr.Wrap(ErrAccountNil)
Expand All @@ -195,6 +194,7 @@ func (c *EthereumClient) CallAuth(gasLimit uint64,
auth.GasLimit = gasLimit // in units
}
auth.GasPrice = gasPrice
auth.Context = context.Background()

tx, err := fn(c.client, auth)
if tx != nil {
Expand Down

0 comments on commit 337da19

Please sign in to comment.