mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
removed unnecessary function & setFeeAmount edit
This commit is contained in:
parent
653df9a0d7
commit
c5078d6a71
|
@ -308,29 +308,18 @@ contract EventHelpers is LiquidityManage {
|
||||||
contract LiquidityAccessHelper is EventHelpers {
|
contract LiquidityAccessHelper is EventHelpers {
|
||||||
/**
|
/**
|
||||||
* @dev Set Fee Amount of borrowed flashloan using `getId`.
|
* @dev Set Fee Amount of borrowed flashloan using `getId`.
|
||||||
|
* @param amt Get token amount at this ID from `InstaMemory` Contract.
|
||||||
* @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 setFeeAmount(uint getId, uint setId) external payable {
|
function setFeeAmount(uint amt, uint getId, uint setId) external payable {
|
||||||
uint amt = getUint(getId, 0);
|
_amt = getUint(getId, amt);
|
||||||
require(amt != 0, "amt-is-0");
|
require(_amt != 0, "amt-is-0");
|
||||||
uint totalFee = calculateTotalFeeAmt(amt);
|
uint totalFee = calculateTotalFeeAmt(_amt);
|
||||||
|
|
||||||
setUint(setId, totalFee);
|
setUint(setId, totalFee);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @dev Set Fee Amount of borrowed flashloan using `token`.
|
|
||||||
* @param token token address.(For ETH: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE)
|
|
||||||
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
|
||||||
*/
|
|
||||||
function setFeeAmountToken(address token, uint setId) external payable {
|
|
||||||
uint amt = LiqudityInterface(getLiquidityAddress()).borrowedToken(token);
|
|
||||||
require(amt != 0, "amt-is-0");
|
|
||||||
uint totalFee = calculateTotalFeeAmt(amt);
|
|
||||||
|
|
||||||
setUint(setId, totalFee);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
contract LiquidityAccess is LiquidityAccessHelper {
|
contract LiquidityAccess is LiquidityAccessHelper {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user