Skip to content

Commit

Permalink
Zero value fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bcngod committed Dec 2, 2020
1 parent 65787af commit 6895af0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contracts/impl/ChainlinkedKeep3rV10OracleMainAsset.sol
Expand Up @@ -72,6 +72,9 @@ contract ChainlinkedKeep3rV1OracleMainAsset is ChainlinkedOracleSimple {
* @return Q112-encoded price of asset amount in ETH
**/
function assetToEth(address asset, uint amount) public view override returns (uint) {
if (amount == 0) {
return 0;
}
if (asset == WETH) {
return amount.mul(Q112);
}
Expand Down

0 comments on commit 6895af0

Please sign in to comment.