Skip to content

Commit

Permalink
return testenv instead of simultaed backend
Browse files Browse the repository at this point in the history
  • Loading branch information
bonedaddy committed Mar 28, 2021
1 parent b20daf4 commit ef41612
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bclient/bclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"math/big"

"github.com/bonedaddy/go-defi/sushiswap"
"github.com/bonedaddy/go-defi/testenv"
"github.com/bonedaddy/go-defi/uniswap"
"github.com/bonedaddy/go-defi/utils"
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
"github.com/ethereum/go-ethereum/ethclient"
)

Expand Down Expand Up @@ -37,8 +37,8 @@ func NewClient(ctx context.Context, bc utils.Blockchain) (*BClient, error) {
// SimulatedBackend attempts to conver the Blockchain interface to a simulated backend type
// returning an error if unable to type convert the interface. This likely indicates
// that an ethclient backend is being used
func (bc *BClient) SimulatedBackend() (*backends.SimulatedBackend, error) {
sn, ok := bc.bc.(*backends.SimulatedBackend)
func (bc *BClient) SimulatedBackend() (*testenv.Testenv, error) {
sn, ok := bc.bc.(*testenv.Testenv)
if !ok {
return nil, ErrNotSimulatedBackend
}
Expand Down

0 comments on commit ef41612

Please sign in to comment.