diff --git a/test/integration/wallet.test.ts b/test/integration/wallet.test.ts index 85b340e..4675388 100644 --- a/test/integration/wallet.test.ts +++ b/test/integration/wallet.test.ts @@ -224,6 +224,7 @@ describe('Wallet', () => { to: ADDRESS2, value: web3Utils.toHex(7_000_000_000), }); + console.log('result', result); deepEqualExcluding(result, tx, [ 'gasLimit', 'gasPrice', @@ -232,9 +233,9 @@ describe('Wallet', () => { ]); expect(toBigInt(result.gasLimit) > 0n).toEqual(true); expect( - toBigInt(result.maxPriorityFeePerGas) > 0n || - toBigInt(result.maxFeePerGas) > 0n || - toBigInt(result.gasPrice) > 0n, + (result.maxPriorityFeePerGas && toBigInt(result.maxPriorityFeePerGas) > 0n) || + (result.maxFeePerGas && toBigInt(result.maxFeePerGas) > 0n) || + (result.gasPrice && toBigInt(result.gasPrice) > 0n), ).toEqual(true); }); it('should return a populated transaction with default values if are omitted', async () => { @@ -1311,6 +1312,11 @@ describe('Wallet', () => { const l2BalanceAfterExecution = await wallet.getBalance(); const l1BalanceAfterExecution = await wallet.getBalanceL1(); expect(result).not.toBeNull(); + console.log({ + l2BalanceAfterExecution, + l2BalanceBeforeExecution, + amount, + }); expect(l2BalanceAfterExecution - l2BalanceBeforeExecution >= amount).toEqual(true); expect(l1BalanceBeforeExecution - l1BalanceAfterExecution >= amount).toEqual(true); }); diff --git a/test/local/account-abstraction.test.ts b/test/local/account-abstraction.test.ts index 2156678..cb64aee 100644 --- a/test/local/account-abstraction.test.ts +++ b/test/local/account-abstraction.test.ts @@ -20,8 +20,6 @@ describe('Account Abstraction', () => { const PRIVATE_KEY1 = accounts[0].privateKey; const ADDRESS1 = accounts[0].address; const wallet = new ZKsyncWallet(PRIVATE_KEY1, l2Provider); - const acc = l2Provider.eth.accounts.privateKeyToAccount(PRIVATE_KEY1); - l2Provider.eth.accounts.wallet.add(acc); it('use the ERC20 token for paying transaction fee', async () => { const InitMintAmount = 10n; const mintAmount = 3n; diff --git a/test/local/deposit-withdraw.test.ts b/test/local/deposit-withdraw.test.ts index 9c57069..4d59f1f 100644 --- a/test/local/deposit-withdraw.test.ts +++ b/test/local/deposit-withdraw.test.ts @@ -1,6 +1,5 @@ import { Web3ZKsyncL2, Web3ZKsyncL1, ZKsyncWallet } from '../../src'; import { ETH_ADDRESS } from '../../src/constants'; -import * as utils from '../../src/utils'; import { getAccounts } from './fixtures'; import { L1_CHAIN_URL, L2_CHAIN_URL } from '../utils'; @@ -11,8 +10,6 @@ import { L1_CHAIN_URL, L2_CHAIN_URL } from '../utils'; jest.setTimeout(60000); describe('wallet', () => { - // @ts-ignore - TransactionFactory.registerTransactionType(EIP712_TX_TYPE, utils.EIP712Transaction); const l1Provider = new Web3ZKsyncL1(L1_CHAIN_URL); const accounts = getAccounts(); const l2Provider = new Web3ZKsyncL2(L2_CHAIN_URL);