Skip to content

Commit

Permalink
fix: remove account test from contract tests
Browse files Browse the repository at this point in the history
  • Loading branch information
badurinantun committed Jul 18, 2022
1 parent 6a1760e commit d444e7f
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions __tests__/contract.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { isBN } from 'bn.js';

import { Account, Contract, ContractFactory, Provider, stark } from '../src';
import { Contract, ContractFactory, stark } from '../src';
import { getSelectorFromName } from '../src/utils/hash';
import { BigNumberish, toBN } from '../src/utils/number';
import { compileCalldata } from '../src/utils/stark';
import {
compiledErc20,
compiledMulticall,
compiledTypeTransformation,
getTestAccount,
getTestProvider,
} from './fixtures';

Expand Down Expand Up @@ -188,34 +187,6 @@ describe('class Contract {}', () => {
});
});
});

describe('Contract interaction with Account', () => {
const account = getTestAccount(provider);
let erc20: Contract;
let erc20Address: string;

beforeAll(async () => {
const erc20Response = await provider.deployContract({
contract: compiledErc20,
});
erc20Address = erc20Response.contract_address;
erc20 = new Contract(compiledErc20.abi, erc20Address, provider);
await provider.waitForTransaction(erc20Response.transaction_hash);
});

test('read balance of wallet', async () => {
const result = await erc20.balance_of(account.address);
const [res] = result;
expect(res).toStrictEqual(toBN(0));
expect(res).toStrictEqual(result.res);
});

test('change from provider to account', async () => {
expect(erc20.providerOrAccount instanceof Provider);
erc20.connect(account);
expect(erc20.providerOrAccount instanceof Account);
});
});
});

describe('class ContractFactory {}', () => {
Expand Down

0 comments on commit d444e7f

Please sign in to comment.