update lending script
This commit is contained in:
@@ -86,21 +86,12 @@ contract Lending is
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev 授权升级函数 - 只有 owner 可以升级
|
||||
*/
|
||||
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
|
||||
|
||||
/**
|
||||
* @notice 暂停合约
|
||||
*/
|
||||
function pause() external onlyOwner {
|
||||
_pause();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notice 恢复合约
|
||||
*/
|
||||
|
||||
function unpause() external onlyOwner {
|
||||
_unpause();
|
||||
}
|
||||
@@ -527,7 +518,7 @@ contract Lending is
|
||||
return LendingMath.principalToBalance(principal, supplyIndex);
|
||||
}
|
||||
|
||||
function balanceOf(address account) external view override returns (uint256) {
|
||||
function supplyBalanceOf(address account) external view override returns (uint256) {
|
||||
int104 principal = userBasic[account].principal;
|
||||
if (principal <= 0) return 0;
|
||||
// 只返回正余额(存款)
|
||||
|
||||
Reference in New Issue
Block a user