Skip to content

Commit

Permalink
fix converter ramp
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgonzalezra committed Aug 13, 2019
1 parent 31f743d commit 9593c6d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/ConverterRamp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ contract ConverterRamp is Ownable {
(uint256 tokenCost) = convertSafe(_converter, _fromToken, address(token), amount);

/// approve token to loan manager
require(token.safeApprove(_loanManagerAddress, tokenCost), "Error approving lend token transfer");
require(token.safeApprove(_loanManagerAddress, amount), "Error approving lend token transfer");

uint256 prevTokenBalance = token.balanceOf(address(this));

Expand Down Expand Up @@ -211,7 +211,7 @@ contract ConverterRamp is Ownable {
uint256 prevEthBalance = (address(this).balance).sub(msg.value);

/// call convert in token converter
tokenConverter.convert.value(_amount)(fromToken, toToken, _amount, _tokenCost, _etherCost);
tokenConverter.convert.value(_etherCost)(fromToken, toToken, _amount, _tokenCost, _etherCost);

/// Return leftover eth
uint256 surplus = (address(this).balance).sub(prevEthBalance);
Expand Down

0 comments on commit 9593c6d

Please sign in to comment.