From 982963bc2a5e4302956b4bf496430eac20896d2a Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Thu, 28 Jan 2021 11:08:19 +0000 Subject: [PATCH] tests: make transferFromExpectSuccess accept bigin --- --- a/tests/src/util/helpers.ts +++ b/tests/src/util/helpers.ts @@ -497,7 +497,7 @@ accountApproved: IKeyringPair, accountFrom: IKeyringPair, accountTo: IKeyringPair, - value: number = 1, + value: number | bigint = 1, type: string = 'NFT') { await usingApi(async (api: ApiPromise) => { let balanceBefore = new BN(0); @@ -516,7 +516,7 @@ } if (type === 'Fungible') { const balanceAfter = await api.query.nft.balance(collectionId, accountTo.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 = -- gitstuff