Skip to content

Commit

Permalink
feat(pfs): let requester settle the reward
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed Nov 4, 2024
1 parent 852c01a commit e3d1824
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions contracts/apps/WitPriceFeedsUpgradable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,10 @@ contract WitPriceFeedsUpgradable
virtual override
returns (uint256)
{
_require(
updateSLA.equalOrGreaterThan(__defaultRadonSLA),
"unsecure update request"
);
return __requestUpdate(feedId, updateSLA);
}

Expand Down Expand Up @@ -696,12 +700,7 @@ contract WitPriceFeedsUpgradable
returns (uint256)
{
if (WitPriceFeedsDataLib.seekRecord(feedId).radHash != 0) {
// TODO: let requester settle the reward (see WRV2.randomize(..))
uint256 _evmUpdateRequestFee = estimateUpdateRequestFee(tx.gasprice);
_require(
msg.value >= _evmUpdateRequestFee,
"insufficient update fee"
);
uint256 _evmUpdateRequestFee = msg.value;
try WitPriceFeedsDataLib.requestUpdate(
witOracle,
feedId,
Expand Down

0 comments on commit e3d1824

Please sign in to comment.