Skip to content

Commit

Permalink
fix: redstone test round id
Browse files Browse the repository at this point in the history
Signed-off-by: Pablo Maldonado <pablo@umaproject.org>
  • Loading branch information
md0x committed May 20, 2024
1 parent da0ab20 commit 08875ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/fork/adapters/RedStoneAsChainlinkSourceAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ contract RedstoneAsChainlinkSourceAdapterTest is CommonTest {
uint256 targetTime = block.timestamp - 1 hours;
(uint80 latestRound,,,,) = redstone.latestRoundData();

(int256 lookBackPrice, uint256 lookBackTimestamp,) = sourceAdapter.tryLatestDataAt(targetTime, 10);
(int256 lookBackPrice, uint256 lookBackTimestamp, uint256 roundId) = sourceAdapter.tryLatestDataAt(targetTime, 10);
(, int256 answer,, uint256 updatedAt,) = redstone.getRoundData(latestRound);
assertTrue(roundId == latestRound);
assertTrue(updatedAt <= targetTime);
assertTrue(scaleRedstoneTo18(answer) == lookBackPrice);
assertTrue(updatedAt == lookBackTimestamp);
Expand Down

0 comments on commit 08875ca

Please sign in to comment.