Skip to content

Commit

Permalink
fix: max int check
Browse files Browse the repository at this point in the history
Signed-off-by: Reinis Martinsons <reinis@umaproject.org>
  • Loading branch information
Reinis-FRP committed May 20, 2024
1 parent 6af6d6f commit 98894e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/oracles/CoinbaseOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ contract CoinbaseOracle is IAggregatorV3SourceCoinbase {

require(timestamp > latestTimestamp, "Invalid timestamp.");
require(recoverSigner(priceData, signature) == reporter, "Invalid signature.");
require(price < type(int256).max, "price too large");
require(price < uint256(type(int256).max), "Price exceeds max value.");

priceDataStruct.lastRoundId++;
priceDataStruct.roundAnswers[priceDataStruct.lastRoundId] = int256(price);
Expand Down

0 comments on commit 98894e1

Please sign in to comment.