diff --git a/contracts/svetofor.sol b/contracts/svetofor.sol index fcbb463..47557a6 100644 --- a/contracts/svetofor.sol +++ b/contracts/svetofor.sol @@ -62,7 +62,7 @@ contract SwitchForMoney function AmountToEnable(string calldata id) public view returns (int256) { - if (IsOn(id)) return 0; + if (!IsOn(id)) return 0; return -switches[id].diff + 1; }