Skip to content

Commit

Permalink
contracts: Fix issue #99 with console.logs
Browse files Browse the repository at this point in the history
As suggested here:
NomicFoundation/hardhat#1046
  • Loading branch information
bingen committed Nov 25, 2020
1 parent 2fe15b6 commit 97c0fb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/contracts/contracts/CDPManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,8 @@ contract CDPManager is LiquityBase, Ownable, ICDPManager {
}

function applyPendingRewards(address _user) external override {
// TODO: remove!
console.log('apply rewards', _user);
_requireCallerIsBorrowerOperations();
return _applyPendingRewards(_user);
}
Expand Down Expand Up @@ -981,6 +983,8 @@ contract CDPManager is LiquityBase, Ownable, ICDPManager {

// Update user's snapshots of L_ETH and L_CLVDebt to reflect the current values
function updateCDPRewardSnapshots(address _user) external override {
// TODO: remove!
console.log('update rewards', _user);
_requireCallerIsBorrowerOperations();
return _updateCDPRewardSnapshots(_user);
}
Expand Down
2 changes: 2 additions & 0 deletions packages/contracts/contracts/CLVToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ contract CLVToken is ICLVToken, Ownable {
// --- 'require' functions ---

function _requireCallerIsBorrowerOperations() internal view {
// TODO: remove!
console.log('_requireCallerIsBorrowerOperations');
require(msg.sender == borrowerOperationsAddress, "CLVToken: Caller is not BorrowerOperations");
}

Expand Down

0 comments on commit 97c0fb9

Please sign in to comment.