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 26, 2020
1 parent 9b13f6d commit 9fc04b2
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 @@ -961,6 +961,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 @@ -995,6 +997,8 @@ contract CDPManager is LiquityBase, Ownable, ICDPManager {

// Update borrower's snapshots of L_ETH and L_CLVDebt to reflect the current values
function updateCDPRewardSnapshots(address _borrower) external override {
// TODO: remove!
console.log('update rewards', _borrower);
_requireCallerIsBorrowerOperations();
return _updateCDPRewardSnapshots(_borrower);
}
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 @@ -207,6 +207,8 @@ contract CLVToken is ICLVToken {
}

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

Expand Down

0 comments on commit 9fc04b2

Please sign in to comment.