mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
changed setId, setId in main.sol
This commit is contained in:
parent
1851104d6f
commit
c58ddef20a
|
@ -43,26 +43,21 @@ contract ERC20PermitResolver is Stores {
|
||||||
external
|
external
|
||||||
returns (string memory _eventName, bytes memory _eventParam)
|
returns (string memory _eventName, bytes memory _eventParam)
|
||||||
{
|
{
|
||||||
if(token == daiAddress){
|
|
||||||
uint _amt = getUint(getId, amount);
|
uint _amt = getUint(getId, amount);
|
||||||
|
|
||||||
|
if(token == daiAddress){
|
||||||
DAITokenInterfaceWithPermit token = DAITokenInterfaceWithPermit(token);
|
DAITokenInterfaceWithPermit token = DAITokenInterfaceWithPermit(token);
|
||||||
|
|
||||||
token.permit(owner, address(this), nonce, deadline, true, v, r, s);
|
token.permit(owner, address(this), nonce, deadline, true, v, r, s);
|
||||||
token.transferFrom(owner, address(this), _amt);
|
token.transferFrom(owner, address(this), _amt);
|
||||||
|
|
||||||
setUint(setId, _amt);
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
uint _amt = getUint(getId, amount);
|
|
||||||
|
|
||||||
TokenInterfaceWithPermit token = TokenInterfaceWithPermit(token);
|
TokenInterfaceWithPermit token = TokenInterfaceWithPermit(token);
|
||||||
|
|
||||||
token.permit(owner, address(this), amount, deadline, v, r, s);
|
token.permit(owner, address(this), amount, deadline, v, r, s);
|
||||||
token.transferFrom(owner, address(this), _amt);
|
token.transferFrom(owner, address(this), _amt);
|
||||||
|
}
|
||||||
|
|
||||||
setUint(setId, _amt);
|
setUint(setId, _amt);
|
||||||
}
|
|
||||||
|
|
||||||
_eventName = "depositWithPermit(address,address,uint256,uint256,uint256,uint8,bytes32,bytes32,uint256,uint256)";
|
_eventName = "depositWithPermit(address,address,uint256,uint256,uint256,uint8,bytes32,bytes32,uint256,uint256)";
|
||||||
_eventParam = abi.encode(
|
_eventParam = abi.encode(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user