-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Receivable E2E testing #374
Conversation
|
@@ -17,7 +17,7 @@ task( | |||
.setAction(async (taskArgs: { poolConfigAddr: string }, hre: HardhatRuntimeEnvironment) => { | |||
let borrowerActive: SignerWithAddress; | |||
|
|||
[, , , , , , , , , , , , , borrowerActive] = await hre.ethers.getSigners(); | |||
[, , , , , , , , , , , , borrowerActive] = await hre.ethers.getSigners(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems very error prone. Can we take the length - 1
th index of the array instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can create a helper function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think length - 1
really solves error proneness of this, which is that the index could always change if someone reorders the signers in the deploy script... We could add a function that takes the getSigners
and returns an object so we don't need to rely on the position in the array?
await submitRedemptionRequestToTranche(hre, juniorTranche, evaluationAgent); | ||
await submitRedemptionRequestToTranche(hre, seniorTranche, seniorLender); | ||
// Submit redemption requests | ||
await submitRedemptionRequestToTranche(hre, juniorTranche, juniorLender); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remind me if this is the final withdrawal after maturity? If so, we should update this to use the pool closure flow, i.e. closePool()
then calling withdrawAfterPoolClosure()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is. I'll look into updating this logic.
No description provided.