mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
bug resolved
This commit is contained in:
parent
e61630b0f8
commit
1c5472c0c7
|
@ -1,8 +1,8 @@
|
||||||
pragma solidity ^0.6.0;
|
pragma solidity ^0.6.0;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
|
import { SafeERC20 } from "../../node_modules/@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
|
||||||
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
import { IERC20 } from "../../node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||||
|
|
||||||
interface LiqudityInterface {
|
interface LiqudityInterface {
|
||||||
function deposit(address, uint) external payable;
|
function deposit(address, uint) external payable;
|
||||||
|
@ -156,7 +156,7 @@ contract LiquidityHelpers is Helpers {
|
||||||
|
|
||||||
function calculateTotalFeeAmt(address token, uint amt) internal view returns (uint totalAmt) {
|
function calculateTotalFeeAmt(address token, uint amt) internal view returns (uint totalAmt) {
|
||||||
uint fee = InstaPoolFeeInterface(getInstaPoolFeeAddr()).fee();
|
uint fee = InstaPoolFeeInterface(getInstaPoolFeeAddr()).fee();
|
||||||
uint flashAmt = liquidityContract.borrowedToken(token);
|
uint flashAmt = LiqudityInterface(getLiquidityAddress()).borrowedToken(token);
|
||||||
if (fee == 0) {
|
if (fee == 0) {
|
||||||
totalAmt = amt;
|
totalAmt = amt;
|
||||||
} else {
|
} else {
|
||||||
|
@ -314,7 +314,7 @@ contract LiquidityAccessHelper is EventHelpers {
|
||||||
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
* @param setId Set token amount at this ID in `InstaMemory` Contract.
|
||||||
*/
|
*/
|
||||||
function setFeeAmount(address token, uint amt, uint getId, uint setId) external payable {
|
function setFeeAmount(address token, uint amt, uint getId, uint setId) external payable {
|
||||||
_amt = getUint(getId, amt);
|
uint _amt = getUint(getId, amt);
|
||||||
require(_amt != 0, "amt-is-0");
|
require(_amt != 0, "amt-is-0");
|
||||||
uint totalFee = calculateTotalFeeAmt(token, _amt);
|
uint totalFee = calculateTotalFeeAmt(token, _amt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user