Skip to content

Commit

Permalink
Merge pull request #7 from ValantisLabs/fix/hexen-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
happenwah authored Sep 19, 2024
2 parents a767baf + d05d0bb commit 858e116
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
8 changes: 1 addition & 7 deletions src/Validly.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ contract Validly is IValidly, ERC20, ReentrancyGuard {
*/
error Validly__deadlineExpired();
error Validly__onlyPool();
error Validly__priceOutOfRange();
error Validly__constructor_customSovereignVaultNotAllowed();
error Validly__constructor_invalidPool();
error Validly__deposit_insufficientToken0Deposited();
error Validly__deposit_insufficientToken1Deposited();
error Validly__deposit_invalidRecipient();
error Validly__deposit_lessThanMinShares();
error Validly__deposit_zeroShares();
error Validly__getLiquidityQuote_feeInBipsZero();
Expand Down Expand Up @@ -146,10 +144,6 @@ contract Validly is IValidly, ERC20, ReentrancyGuard {
nonReentrant
returns (uint256 shares, uint256 amount0, uint256 amount1)
{
if (_recipient == address(0)) {
revert Validly__deposit_invalidRecipient();
}

uint256 totalSupplyCache = totalSupply();
if (totalSupplyCache == 0) {
// Minimum token amounts taken as amounts during first deposit
Expand Down Expand Up @@ -394,7 +388,7 @@ contract Validly is IValidly, ERC20, ReentrancyGuard {
}
}
}
// Did not converge in 256 fixed point iterations,
// Did not converge in 255 fixed point iterations,
// revert for safety
revert Validly___get_y_notConverged();
}
Expand Down
3 changes: 0 additions & 3 deletions test/Validly.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ contract ValidlyTest is Test {
vm.expectRevert(Validly.Validly__deadlineExpired.selector);
volatilePair.deposit(10 ether, 0, 0, block.timestamp - 1, address(0), "");

vm.expectRevert(Validly.Validly__deposit_invalidRecipient.selector);
volatilePair.deposit(10 ether, 0, 0, block.timestamp + 1, address(0), "");

vm.expectRevert(Validly.Validly__deposit_lessThanMinShares.selector);
volatilePair.deposit(10000, 10000, 10000, block.timestamp + 1, address(this), "");

Expand Down

0 comments on commit 858e116

Please sign in to comment.