Skip to content

Commit

Permalink
fix: resolve colision among dependencies #29
Browse files Browse the repository at this point in the history
  • Loading branch information
danijelTxFusion committed Feb 23, 2024
1 parent ce8c9fd commit d7470d9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion accounts/eth_signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/signer/core/apitypes"
"github.com/miguelmota/go-ethereum-hdwallet"
"github.com/pkg/errors"
"github.com/stephenlacy/go-ethereum-hdwallet"
"github.com/zksync-sdk/zksync2-go/eip712"
)

Expand Down
2 changes: 1 addition & 1 deletion accounts/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/signer/core/apitypes"
"github.com/miguelmota/go-ethereum-hdwallet"
"github.com/pkg/errors"
"github.com/stephenlacy/go-ethereum-hdwallet"
"github.com/zksync-sdk/zksync2-go/eip712"
)

Expand Down
19 changes: 19 additions & 0 deletions test/wallet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ import (
"testing"
)

func TestIntegration_NewWalletFromMnemonic(t *testing.T) {
const MNEMONIC = "stuff slice staff easily soup parent arm payment cotton trade scatter struggle"

client, err := clients.Dial(ZkSyncEraProvider)
defer client.Close()
assert.NoError(t, err, "clients.Dial should not return an error")

ethClient, err := ethclient.Dial(EthereumProvider)
assert.NoError(t, err, "ethclient.Dial should not return an error")
defer ethClient.Close()

chainId, err := client.ChainID(context.Background())
assert.NoError(t, err, "ChainID should not return an error")

wallet, err := accounts.NewWalletFromMnemonic(MNEMONIC, chainId.Int64(), &client, ethClient)
assert.NoError(t, err, "NewWalletFromMnemonic should not return an error")
assert.NotNil(t, wallet, "Wallet should not be nil")
}

func TestIntegrationWallet_MainContract(t *testing.T) {
client, err := clients.Dial(ZkSyncEraProvider)
defer client.Close()
Expand Down

0 comments on commit d7470d9

Please sign in to comment.