code restruturing

This commit is contained in:
Samyak Jain 2020-05-23 22:08:06 +10:00
parent d9f86e3b68
commit 09a6932acc

View File

@ -90,7 +90,7 @@ contract BasicResolver is AaveHelpers {
* @param getId Get token amount at this ID from `InstaMemory` Contract. * @param getId Get token amount at this ID from `InstaMemory` Contract.
* @param setId Set token amount at this ID in `InstaMemory` Contract. * @param setId Set token amount at this ID in `InstaMemory` Contract.
*/ */
function deposit(address token, uint amt, uint getId, uint setId) external payable{ function deposit(address token, uint amt, uint getId, uint setId) external payable {
uint _amt = getUint(getId, amt); uint _amt = getUint(getId, amt);
AaveInterface aave = AaveInterface(getAaveAddress()); AaveInterface aave = AaveInterface(getAaveAddress());
@ -124,7 +124,7 @@ contract BasicResolver is AaveHelpers {
* @param getId Get token amount at this ID from `InstaMemory` Contract. * @param getId Get token amount at this ID from `InstaMemory` Contract.
* @param setId Set token amount at this ID in `InstaMemory` Contract. * @param setId Set token amount at this ID in `InstaMemory` Contract.
*/ */
function withdraw(address token, uint amt, uint getId, uint setId) external payable{ function withdraw(address token, uint amt, uint getId, uint setId) external payable {
uint _amt = getUint(getId, amt); uint _amt = getUint(getId, amt);
AaveCoreInterface aaveCore = AaveCoreInterface(getAaveCoreAddress()); AaveCoreInterface aaveCore = AaveCoreInterface(getAaveCoreAddress());
ATokenInterface atoken = ATokenInterface(aaveCore.getReserveATokenAddress(token)); ATokenInterface atoken = ATokenInterface(aaveCore.getReserveATokenAddress(token));
@ -236,7 +236,6 @@ contract BasicResolver is AaveHelpers {
aave.repay.value(ethAmt)(token, _amt, payable(address(this))); aave.repay.value(ethAmt)(token, _amt, payable(address(this)));
} }
setUint(setId, _amt); setUint(setId, _amt);
emit LogPayback(token, _amt, getId, setId); emit LogPayback(token, _amt, getId, setId);