-
Beta Was this translation helpful? Give feedback.
Answered by
Nlferu
Dec 22, 2022
Replies: 1 comment 3 replies
-
Hello @franclino You have used incorrect variable in function getConversionRate(uint256 ethAmount) public view returns (uint256) {
uint256 ethPrice = getPrice();
uint256 ethAmountInUsd = (ethPrice * ethAmount) / 1e18;
return ethAmountInUsd;
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
cromewar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello @franclino
You have used incorrect variable in
getConversionRate()
function, you have just usedethAmount
in wrong place, function should look like below: