Skip to content

Commit 6895af0

Browse files
committed
Zero value fix
1 parent 65787af commit 6895af0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contracts/impl/ChainlinkedKeep3rV10OracleMainAsset.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ contract ChainlinkedKeep3rV1OracleMainAsset is ChainlinkedOracleSimple {
7272
* @return Q112-encoded price of asset amount in ETH
7373
**/
7474
function assetToEth(address asset, uint amount) public view override returns (uint) {
75+
if (amount == 0) {
76+
return 0;
77+
}
7578
if (asset == WETH) {
7679
return amount.mul(Q112);
7780
}

0 commit comments

Comments
 (0)