git.delta.rocks / unique-network / refs/commits / d2a614a48a5e

difftreelog

test allow larger fee drift

Yaroslav Bolyukin2021-11-29parent: #99b194a.patch.diff
in: master

1 file changed

modifiedtests/src/creditFeesToTreasury.test.tsdiffbeforeafterboth
159 });159 });
160 });160 });
161161
162 it('NFT Transfer fee is close to 0.1 Unique', async () => {162 it.only('NFT Transfer fee is close to 0.1 Unique', async () => {
163 await usingApi(async (api) => {163 await usingApi(async (api) => {
164 await skipInflationBlock(api);164 await skipInflationBlock(api);
165 await waitNewBlocks(api, 1);165 await waitNewBlocks(api, 1);
173173
174 const fee = Number(aliceBalanceBefore - aliceBalanceAfter) / Number(UNIQUE);174 const fee = Number(aliceBalanceBefore - aliceBalanceAfter) / Number(UNIQUE);
175 const expectedTransferFee = 0.1;175 const expectedTransferFee = 0.1;
176 // fee drifts because of NextFeeMultiplier
176 const tolerance = 0.00001;177 const tolerance = 0.001;
177178
178 expect(Math.abs(fee - expectedTransferFee)).to.be.lessThan(tolerance);179 expect(Math.abs(fee - expectedTransferFee)).to.be.lessThan(tolerance);
179 });180 });