git.delta.rocks / unique-network / refs/commits / 3b359ab21b96

difftreelog

tests: make approveExpectFail accept bigint

Yaroslav Bolyukin2021-02-10parent: #ab27086.patch.diff
in: master

1 file changed

modifiedtests/src/util/helpers.tsdiffbeforeafterboth
605605
606export async function606export async function
607approveExpectFail(collectionId: number,607approveExpectFail(collectionId: number,
608 tokenId: number, owner: IKeyringPair, approved: IKeyringPair, amount: number = 1) {608 tokenId: number, owner: IKeyringPair, approved: IKeyringPair, amount: number | bigint = 1) {
609 await usingApi(async (api: ApiPromise) => {609 await usingApi(async (api: ApiPromise) => {
610 const approveNftTx = await api.tx.nft.approve(approved.address, collectionId, tokenId, amount);610 const approveNftTx = await api.tx.nft.approve(approved.address, collectionId, tokenId, amount);
611 const events = await expect(submitTransactionExpectFailAsync(owner, approveNftTx)).to.be.rejected;611 const events = await expect(submitTransactionExpectFailAsync(owner, approveNftTx)).to.be.rejected;