difftreelog
tests: make approveExpectFail accept bigint
in: master
1 file changed
tests/src/util/helpers.tsdiffbeforeafterboth605605606export async function606export async function607approveExpectFail(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;