From 420a16e08e43d9be28dc36108c78592720e93bc5 Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Mon, 11 Mar 2019 21:33:14 +0530 Subject: [PATCH] Fix more require statements in rubixi --- solidity_examples/rubixi.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solidity_examples/rubixi.sol b/solidity_examples/rubixi.sol index 948a07eb..2a4f75fb 100644 --- a/solidity_examples/rubixi.sol +++ b/solidity_examples/rubixi.sol @@ -43,14 +43,14 @@ contract Rubixi { _amt *= 1 ether; if (_amt > collectedFees) collectAllFees(); - require(collectedFees == 0); + require(collectedFees > 0); creator.transfer(_amt); collectedFees -= _amt; } function collectPercentOfFees(uint _pcent) public onlyowner { - require(collectedFees == 0 || _pcent > 100); + require(collectedFees > 0 && _pcent <= 100); uint feesToCollect = collectedFees / 100 * _pcent; creator.transfer(feesToCollect); @@ -63,12 +63,12 @@ contract Rubixi { } function changeMultiplier(uint _mult) public onlyowner { - require(_mult > 300 || _mult < 120); + require(_mult <= 300 && _mult >= 120); pyramidMultiplier = _mult; } function changeFeePercentage(uint _fee) public onlyowner { - require(_fee > 10); + require(_fee <= 10); feePercent = _fee; }