--- a/tests/src/util/helpers.ts +++ b/tests/src/util/helpers.ts @@ -556,7 +556,7 @@ tokenId: number, sender: IKeyringPair, recipient: IKeyringPair, - value: number = 1, + value: number | bigint = 1, type: string = 'NFT') { await usingApi(async (api: ApiPromise) => { let balanceBefore = new BN(0); @@ -574,7 +574,7 @@ } if (type === 'Fungible') { const balanceAfter = await api.query.nft.balance(collectionId, recipient.address) as unknown as BN; - expect(balanceAfter.sub(balanceBefore).toNumber()).to.be.equal(value); + expect(balanceAfter.sub(balanceBefore).toString()).to.be.equal(value.toString()); } if (type === 'ReFungible') { const nftItemData =