From 53eed3555bf8603fd3d2f46d97bd78c081aeab51 Mon Sep 17 00:00:00 2001 From: Moody Salem Date: Mon, 27 Apr 2020 14:23:33 -0400 Subject: [PATCH] Avoid the edge case where block timestamp overflows to 0 (#19) --- contracts/ExampleOracleSimple.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/ExampleOracleSimple.sol b/contracts/ExampleOracleSimple.sol index d712cca0..0978989e 100644 --- a/contracts/ExampleOracleSimple.sol +++ b/contracts/ExampleOracleSimple.sol @@ -32,7 +32,6 @@ contract ExampleOracleSimple { uint112 reserve1; (reserve0, reserve1, blockTimestampLast) = _pair.getReserves(); require(reserve0 != 0 && reserve1 != 0, 'ExampleOracleSimple: NO_RESERVES'); // ensure that there's liquidity in the pair - require(blockTimestampLast != 0, 'ExampleOracleSimple: NO_PRICE_HISTORY'); // ensure there's a price history } function update() external {