Skip to content

Commit

Permalink
Fix local deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
ljiatu committed Dec 31, 2023
1 parent b90a58f commit f393b5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/deploy-local-test-pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function depositFirstLossCover(coverContract: FirstLossCover, account: Sig
await mockTokenContract
.connect(account)
.approve(coverContract.address, ethers.constants.MaxUint256);
await coverContract.connect(account).depositCover(toToken(1_000));
await coverContract.connect(account).depositCover(toToken(20_000));
}

async function deployPool(
Expand Down Expand Up @@ -160,7 +160,7 @@ async function deployPool(
poolConfigContract,
poolOwner,
{
maxLiquidity: totalAssetsBorrowerFLC.sub(yieldAmount),
maxLiquidity: totalAssetsBorrowerFLC.add(yieldAmount),
},
);
await overrideFirstLossCoverConfig(
Expand All @@ -169,7 +169,7 @@ async function deployPool(
poolConfigContract,
poolOwner,
{
maxLiquidity: totalAssetsAffiliateFLC.sub(yieldAmount),
maxLiquidity: totalAssetsAffiliateFLC.add(yieldAmount),
},
);

Expand Down
5 changes: 5 additions & 0 deletions test/integration/credit/CreditLineIntegrationTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ describe("Credit Line Integration Test", function () {
.connect(borrower)
.approve(borrowerFirstLossCoverContract.address, ethers.constants.MaxUint256);

const firstLossCoverMaxLiquidity = toToken(1_000_000);
await overrideFirstLossCoverConfig(
borrowerFirstLossCoverContract,
CONSTANTS.BORROWER_FIRST_LOSS_COVER_INDEX,
Expand All @@ -264,8 +265,12 @@ describe("Credit Line Integration Test", function () {
{
coverRatePerLossInBps,
coverCapPerLoss,
maxLiquidity: firstLossCoverMaxLiquidity,
},
);
await borrowerFirstLossCoverContract
.connect(borrower)
.depositCover(firstLossCoverMaxLiquidity);

await juniorTrancheVaultContract
.connect(juniorLender)
Expand Down

0 comments on commit f393b5f

Please sign in to comment.