File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
contracts/contracts/sapphire Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,7 @@ contract CrossChainPaymaster is
390390 // Validate token price
391391 if (tPrice <= 0 ) revert InvalidPrice (tPrice);
392392 if (tAnsweredIn < tRound) revert StalePrice (0 , 0 );
393- if (tUpdated == 0 || block .timestamp - tUpdated > stalenessThreshold) revert StalePrice (tUpdated, stalenessThreshold);
393+ if (tUpdated == 0 || ( block .timestamp > tUpdated && block . timestamp - tUpdated > stalenessThreshold) ) revert StalePrice (tUpdated, stalenessThreshold);
394394
395395 // Get ROSE/USD price (single aggregated feed from ROFL oracle)
396396 AggregatorV3Interface roseFeed = AggregatorV3Interface (roseUsdFeed);
@@ -399,7 +399,7 @@ contract CrossChainPaymaster is
399399 // Validate ROSE price
400400 if (rPrice <= 0 ) revert InvalidPrice (rPrice);
401401 if (rAnsweredIn < rRound) revert StalePrice (0 , 0 );
402- if (rUpdated == 0 || block .timestamp - rUpdated > stalenessThreshold) revert StalePrice (rUpdated, stalenessThreshold);
402+ if (rUpdated == 0 || ( block .timestamp > rUpdated && block . timestamp - rUpdated > stalenessThreshold) ) revert StalePrice (rUpdated, stalenessThreshold);
403403
404404 uint8 tokenDec = tokenDecimals[token];
405405 if (tokenDec == 0 ) tokenDec = 18 ;
You can’t perform that action at this time.
0 commit comments