mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
sub-acc transfers updated
This commit is contained in:
parent
c62c31a62f
commit
2db101a792
|
@ -36,7 +36,7 @@ interface IEulerEToken {
|
|||
|
||||
function balanceOf(address account) external view returns (uint256);
|
||||
|
||||
function transfer(address to, uint256 amount) external returns (bool);
|
||||
function transferFrom(address from, address to, uint amount) external returns (bool);
|
||||
|
||||
function approve(address spender, uint256 amount) external returns (bool);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ interface IEulerDToken {
|
|||
|
||||
function balanceOf(address account) external view returns (uint256);
|
||||
|
||||
function transfer(address to, uint256 amount) external returns (bool);
|
||||
function transferFrom(address from, address to, uint amount) external returns (bool);
|
||||
|
||||
function approveDebt(
|
||||
uint256 subAccountId,
|
||||
|
|
|
@ -305,9 +305,10 @@ abstract contract Euler is Helpers {
|
|||
|
||||
if (isEth) convertEthToWeth(isEth, TokenInterface(_token), _amt);
|
||||
|
||||
address _subAccountFromAddr = getSubAccount(address(this), subAccountFrom);
|
||||
address _subAccountToAddr = getSubAccount(address(this), subAccountTo);
|
||||
|
||||
eToken.transfer(_subAccountToAddr, _amt);
|
||||
eToken.transferFrom(_subAccountFromAddr, _subAccountToAddr, _amt);
|
||||
|
||||
setUint(setId, _amt);
|
||||
|
||||
|
@ -357,8 +358,9 @@ abstract contract Euler is Helpers {
|
|||
|
||||
if (isEth) convertEthToWeth(isEth, TokenInterface(_token), _amt);
|
||||
|
||||
address _subAccountFromAddr = getSubAccount(address(this), subAccountFrom);
|
||||
address _subAccountToAddr = getSubAccount(address(this), subAccountTo);
|
||||
dToken.transfer(_subAccountToAddr, amt);
|
||||
dToken.transferFrom(_subAccountFromAddr, _subAccountToAddr, _amt);
|
||||
|
||||
setUint(setId, _amt);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user