Skip to content

Commit

Permalink
Merge branch 'master' into build/hardhat-compile
Browse files Browse the repository at this point in the history
  • Loading branch information
CruzMolina authored Jun 3, 2021
2 parents 6b5960c + 6c2d8c9 commit c309729
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/core/Controller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,10 @@ contract Controller is Initializable, OwnableUpgradeSafe, ReentrancyGuardUpgrade
function getProceed(address _owner, uint256 _vaultId) external view returns (uint256) {
(MarginVault.Vault memory vault, uint256 typeVault, ) = getVault(_owner, _vaultId);

(uint256 netValue, ) = calculator.getExcessCollateral(vault, typeVault);
(uint256 netValue, bool isExcess) = calculator.getExcessCollateral(vault, typeVault);

if (!isExcess) return 0;

return netValue;
}

Expand Down

0 comments on commit c309729

Please sign in to comment.