Skip to content

Commit

Permalink
fix more pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodelatorre7 committed Nov 28, 2023
1 parent a9c6d57 commit 1c2aab8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contracts/SharedSmartVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,10 @@ contract SharedSmartVault is AccessControlUpgradeable, UUPSUpgradeable, ERC4626U
uint256 assets,
uint256 shares
) internal virtual override {
uint256 prevBalance = _balance();
super._deposit(caller, receiver, assets, shares);
_collector.call(asset(), assets);

Check warning on line 132 in contracts/SharedSmartVault.sol

View workflow job for this annotation

GitHub Actions / Ensuro Tests

Avoid to use low level calls
require(
_balance() == 0,
"SharedSmartVault: balance of the shared smart vault should be 0 after deposit"
);
require(_balance() == prevBalance, "SharedSmartVault: the balance should be the same.");

Check warning on line 133 in contracts/SharedSmartVault.sol

View workflow job for this annotation

GitHub Actions / Ensuro Tests

Use Custom Errors instead of require statements
}

function maxDeposit(address owner) public view virtual override returns (uint256) {
Expand Down

0 comments on commit 1c2aab8

Please sign in to comment.