conflict fixes

This commit is contained in:
Aniket-Engg
2018-10-22 13:21:32 +05:30
parent 51e4da155b
commit a781955434
3 changed files with 0 additions and 38 deletions

View File

@ -36,10 +36,6 @@ contract ERC20FailingMock is IERC20 {
function allowance(address, address) public view returns (uint256) {
return 0;
}
function setAllowance(uint256 value) public {
_allowance = value;
}
}
contract ERC20SucceedingMock is IERC20 {
@ -153,17 +149,4 @@ contract SafeERC20Helper {
function doSucceedingApprove() public {
_succeeding.safeApprove(address(0), 0);
}
function doFailingApproveByValue() public {
_succeeding.setAllowance(10);
_succeeding.safeApprove(address(0), 10);
}
function doSucceedingIncreaseAllowance() public {
_succeeding.safeIncreaseAllowance(address(0), 0);
}
function doSucceedingDecreaseAllowance() public {
_succeeding.safeDecreaseAllowance(address(0), 0);
}
}

View File

@ -17,15 +17,6 @@ interface IERC20 {
function transferFrom(address from, address to, uint256 value) external returns (bool);
function increaseAllowance(address spender, uint256 addedValue)
external returns (bool);
function decreaseAllowance(address spender, uint256 subtractedValue)
external returns (bool);
function setAllowance(uint256 value)
external returns (bool);
event Transfer(
address indexed from,
address indexed to,

View File

@ -98,16 +98,4 @@ contract('SafeERC20', function () {
});
});
});
it('should throw while approving with non-zero existing allowance', async function () {
await shouldFail.reverting(this.helper.doFailingApproveByValue());
});
it('should not throw on succeeding increaseAllowance', async function () {
await this.helper.doSucceedingIncreaseAllowance();
});
it('should not throw on succeeding decreaseAllowance', async function () {
await this.helper.doSucceedingDecreaseAllowance();
});
});