Skip to content

Commit

Permalink
fix: remove maxFee: 0
Browse files Browse the repository at this point in the history
  • Loading branch information
badurinantun committed Jun 8, 2022
1 parent 80a5aba commit 9569819
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 29 deletions.
44 changes: 18 additions & 26 deletions __tests__/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,11 @@ describe('deploy and test Wallet', () => {
});

test('execute by wallet owner', async () => {
const { code, transaction_hash } = await account.execute(
{
contractAddress: erc20Address,
entrypoint: 'transfer',
calldata: [erc20.address, '10'],
},
undefined,
{ maxFee: '0' }
);
const { code, transaction_hash } = await account.execute({
contractAddress: erc20Address,
entrypoint: 'transfer',
calldata: [erc20.address, '10'],
});

expect(code).toBe('TRANSACTION_RECEIVED');
await defaultProvider.waitForTransaction(transaction_hash);
Expand All @@ -110,30 +106,26 @@ describe('deploy and test Wallet', () => {
calldata: [account.address, '10'],
},
undefined,
{ nonce, maxFee: '0' }
{ nonce }
);

expect(code).toBe('TRANSACTION_RECEIVED');
await defaultProvider.waitForTransaction(transaction_hash);
});

test('execute multiple transactions', async () => {
const { code, transaction_hash } = await account.execute(
[
{
contractAddress: dapp.address,
entrypoint: 'set_number',
calldata: ['47'],
},
{
contractAddress: dapp.address,
entrypoint: 'increase_number',
calldata: ['10'],
},
],
undefined,
{ maxFee: '0' }
);
const { code, transaction_hash } = await account.execute([
{
contractAddress: dapp.address,
entrypoint: 'set_number',
calldata: ['47'],
},
{
contractAddress: dapp.address,
entrypoint: 'increase_number',
calldata: ['10'],
},
]);

expect(code).toBe('TRANSACTION_RECEIVED');
await defaultProvider.waitForTransaction(transaction_hash);
Expand Down
4 changes: 1 addition & 3 deletions __tests__/contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,7 @@ describe('class Contract {}', () => {
});

test('invoke contract by wallet owner', async () => {
const { transaction_hash, code } = await erc20.transfer(erc20Address, 10, {
maxFee: 0,
});
const { transaction_hash, code } = await erc20.transfer(erc20Address, 10);
expect(code).toBe('TRANSACTION_RECEIVED');
await defaultProvider.waitForTransaction(transaction_hash);
const { res } = await erc20.balance_of(account.address);
Expand Down

0 comments on commit 9569819

Please sign in to comment.