Skip to content

Commit

Permalink
feat: more strict redemptionDelayBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
gitcoindev committed Feb 25, 2024
1 parent 38c3656 commit 1ef1ab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions packages/contracts/src/dollar/libraries/LibUbiquityPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ library LibUbiquityPool {
poolStorage.lastRedeemedBlock[msg.sender].add(
poolStorage.redemptionDelayBlocks
)
) <= block.number,
) < block.number,
"Too soon to collect redemption"
);

Expand Down Expand Up @@ -533,10 +533,9 @@ library LibUbiquityPool {
// roundId
int256 answer, // startedAt
,
uint256 updatedAt,
uint256 updatedAt, // answeredInRound

) = // answeredInRound
priceFeed.latestRoundData();
) = priceFeed.latestRoundData();

// fetch number of decimals in chainlink feed
uint256 priceFeedDecimals = priceFeed.decimals();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ contract UbiquityPoolFacetTest is DiamondTestSetup {
);

// wait 3 blocks for collecting redemption to become active
vm.roll(3);
vm.roll(block.number + 3);

// balances before
assertEq(collateralToken.balanceOf(address(ubiquityPoolFacet)), 100e18);
Expand Down

0 comments on commit 1ef1ab9

Please sign in to comment.