Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
idanya committed Jul 25, 2023
1 parent 9569993 commit 113e2ee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions services/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
dirmock "github.com/idanya/evm-cli/clients/directory/mocks"
"github.com/idanya/evm-cli/clients/nodes"
"github.com/idanya/evm-cli/clients/nodes/mocks"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
Expand All @@ -18,8 +19,9 @@ func TestTransactionService_GetTransactionReceipt(t *testing.T) {
decoder := NewDecoder(directoryClientMock)

nodeClientMock := mocks.NewNodeClient(t)
nodeGenerator := func() nodes.NodeClient { return nodeClientMock }

transactionService := NewTransactionService(nodeClientMock, directoryClientMock, decoder)
transactionService := NewTransactionService(nodeGenerator, directoryClientMock, decoder)

topicHash := common.HexToHash("0xdb80dd488acf86d17c747445b0eabb5d57c541d3bd7b6b87af987858e5066b2b")
txHash := "0xec8ecd56dca115adcc8de346ffe054841f810964a68afc81faf764f8a0ae7c26"
Expand All @@ -40,8 +42,9 @@ func TestTransactionService_GetTransactionByHash(t *testing.T) {
decoder := NewDecoder(directoryClientMock)

nodeClientMock := mocks.NewNodeClient(t)
nodeGenerator := func() nodes.NodeClient { return nodeClientMock }

transactionService := NewTransactionService(nodeClientMock, directoryClientMock, decoder)
transactionService := NewTransactionService(nodeGenerator, directoryClientMock, decoder)

txHash := "0xec8ecd56dca115adcc8de346ffe054841f810964a68afc81faf764f8a0ae7c26"
functionSignature := "safeTransferFrom(address,address,uint256,bytes)"
Expand Down

0 comments on commit 113e2ee

Please sign in to comment.