Skip to content

Commit

Permalink
fix: safecast to separate variable
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 9, 2024
1 parent 1721a9e commit f9c254a
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,8 @@ abstract contract ChainlinkDestinationAdapter is DiamondRootOval, IAggregatorV3
* hardcodes to 1).
*/
function latestRoundData() external view returns (uint80, int256, uint256, uint256, uint80) {
(int256 answer, uint256 updatedAt, uint256 roundId) = internalLatestData();

return (
SafeCast.toUint80(roundId),
DecimalLib.convertDecimals(answer, 18, decimals),
updatedAt,
updatedAt,
SafeCast.toUint80(roundId)
);
(int256 answer, uint256 updatedAt, uint256 _roundId) = internalLatestData();
roundId = SafeCast.toUint80(_roundId);
return (roundId, DecimalLib.convertDecimals(answer, 18, decimals), updatedAt, updatedAt, roundId);
}
}

0 comments on commit f9c254a

Please sign in to comment.