@@ -75,7 +75,6 @@ contract RiskEngine is Ownable, IRiskEngine {
7575 uint amt
7676 )
7777 external
78- view
7978 returns (bool )
8079 {
8180 uint borrowValue = _valueInWei (token, amt);
@@ -101,7 +100,6 @@ contract RiskEngine is Ownable, IRiskEngine {
101100 uint amt
102101 )
103102 external
104- view
105103 returns (bool )
106104 {
107105 if (IAccount (account).hasNoDebt ()) return true ;
@@ -118,7 +116,7 @@ contract RiskEngine is Ownable, IRiskEngine {
118116 @param account Address of account
119117 @return isAccountHealthy Returns whether an account is healthy or not.
120118 */
121- function isAccountHealthy (address account ) external view returns (bool ) {
119+ function isAccountHealthy (address account ) external returns (bool ) {
122120 return _isAccountHealthy (
123121 _getBalance (account),
124122 _getBorrows (account)
@@ -130,7 +128,7 @@ contract RiskEngine is Ownable, IRiskEngine {
130128 @param account Address of account
131129 @return balance Total account balance
132130 */
133- function getBalance (address account ) external view returns (uint ) {
131+ function getBalance (address account ) external returns (uint ) {
134132 return _getBalance (account);
135133 }
136134
@@ -139,15 +137,15 @@ contract RiskEngine is Ownable, IRiskEngine {
139137 @param account Address of account
140138 @return borrows Total account borrows
141139 */
142- function getBorrows (address account ) external view returns (uint ) {
140+ function getBorrows (address account ) external returns (uint ) {
143141 return _getBorrows (account);
144142 }
145143
146144 /* -------------------------------------------------------------------------- */
147145 /* Internal Functions */
148146 /* -------------------------------------------------------------------------- */
149147
150- function _getBalance (address account ) internal view returns (uint ) {
148+ function _getBalance (address account ) internal returns (uint ) {
151149 address [] memory assets = IAccount (account).getAssets ();
152150 uint assetsLen = assets.length ;
153151 uint totalBalance;
@@ -160,7 +158,7 @@ contract RiskEngine is Ownable, IRiskEngine {
160158 return totalBalance + account.balance;
161159 }
162160
163- function _getBorrows (address account ) internal view returns (uint ) {
161+ function _getBorrows (address account ) internal returns (uint ) {
164162 if (IAccount (account).hasNoDebt ()) return 0 ;
165163 address [] memory borrows = IAccount (account).getBorrows ();
166164 uint borrowsLen = borrows.length ;
@@ -177,7 +175,6 @@ contract RiskEngine is Ownable, IRiskEngine {
177175
178176 function _valueInWei (address token , uint amt )
179177 internal
180- view
181178 returns (uint )
182179 {
183180 return oracle.getPrice (token)
0 commit comments