diff --git a/contracts/treasury/Treasury.sol b/contracts/treasury/Treasury.sol index 4038118..d9aa9b2 100644 --- a/contracts/treasury/Treasury.sol +++ b/contracts/treasury/Treasury.sol @@ -108,10 +108,12 @@ contract Treasury { address target_, uint256 amount_ ) public onlyAdmin { - require(tokenSchedules[target_].target != address(0), "Target schedule doesn't exist"); - tokenSchedules[target_].dripStart = dripStart_; - tokenSchedules[target_].dripRate = dripRate_; - tokenSchedules[target_].amount = amount_; + Schedule memory tokenSchedule = tokenSchedules[target_]; + require(tokenSchedule.target != address(0), "Target schedule doesn't exist"); + tokenSchedule.dripStart = dripStart_; + tokenSchedule.dripRate = dripRate_; + tokenSchedule.amount = amount_; + tokenSchedules[target_] = tokenSchedule; } function grantToken(address account, uint256 amount) public onlyAdmin {