difftreelog
tests: make transferFromExpectSuccess accept bigin
in: master
1 file changed
tests/src/util/helpers.tsdiffbeforeafterboth497 accountApproved: IKeyringPair,497 accountApproved: IKeyringPair,498 accountFrom: IKeyringPair,498 accountFrom: IKeyringPair,499 accountTo: IKeyringPair,499 accountTo: IKeyringPair,500 value: number = 1,500 value: number | bigint = 1,501 type: string = 'NFT') {501 type: string = 'NFT') {502 await usingApi(async (api: ApiPromise) => {502 await usingApi(async (api: ApiPromise) => {503 let balanceBefore = new BN(0);503 let balanceBefore = new BN(0);516 }516 }517 if (type === 'Fungible') {517 if (type === 'Fungible') {518 const balanceAfter = await api.query.nft.balance(collectionId, accountTo.address) as unknown as BN;518 const balanceAfter = await api.query.nft.balance(collectionId, accountTo.address) as unknown as BN;519 expect(balanceAfter.sub(balanceBefore).toNumber()).to.be.equal(value);519 expect(balanceAfter.sub(balanceBefore).toString()).to.be.equal(value.toString());520 }520 }521 if (type === 'ReFungible') {521 if (type === 'ReFungible') {522 const nftItemData =522 const nftItemData =