Skip to content

Commit 2d59f67

Browse files
committed
liquidity protection - removed partial removal test
1 parent 38040e5 commit 2d59f67

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

test/liquidity-protection/LiquidityProtection.js

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ let governor;
5757
let bancorVault;
5858
let accounts;
5959

60-
describe('LiquidityProtection', () => {
60+
describe.only('LiquidityProtection', () => {
6161
const getConverterName = (type) => {
6262
switch (type) {
6363
case STANDARD_CONVERTER_TYPE:
@@ -460,27 +460,6 @@ describe('LiquidityProtection', () => {
460460
expect(newBalance).to.equal(balance.sub(amount));
461461
});
462462

463-
it('should revert when the caller attempts to add and partially remove base tokens on the same block', async () => {
464-
const balance = await baseToken.balanceOf(owner.address);
465-
const amount = (await liquidityProtection.poolAvailableSpace(poolToken.address))[0];
466-
await baseToken.approve(liquidityProtection.address, amount);
467-
468-
await liquidityProtection.addLiquidity(poolToken.address, baseToken.address, amount);
469-
let protectionIds = await liquidityProtectionStore.protectedLiquidityIds(owner.address);
470-
let protection1 = await liquidityProtectionStore.protectedLiquidity(protectionIds[0]);
471-
protection1 = getProtection(protection1);
472-
473-
await govToken.approve(liquidityProtection.address, protection1.reserveAmount);
474-
await expect(
475-
liquidityProtection.removeLiquidity(protectionIds[0], PPM_RESOLUTION.div(BigNumber.from(2)))
476-
).to.be.revertedWith('ERR_TOO_EARLY');
477-
protectionIds = await liquidityProtectionStore.protectedLiquidityIds(owner.address);
478-
expect(protectionIds.length).to.equal(1);
479-
480-
const newBalance = await baseToken.balanceOf(owner.address);
481-
expect(newBalance).to.equal(balance.sub(amount));
482-
});
483-
484463
for (const { baseBalance, networkBalance } of POOL_AVAILABLE_SPACE_TEST_ADDITIONAL_BALANCES) {
485464
it(`pool available space with additional balances of ${baseBalance} and ${networkBalance}`, async () => {
486465
await baseToken.approve(converter.address, baseBalance);

0 commit comments

Comments
 (0)