Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hujw77 committed Nov 20, 2024
1 parent e15f7d3 commit 4674d31
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/eco/XAPIOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,13 @@ contract XAPIOracle is Verifier, IXAPIConsumer {
{
XAPIBuilder.Request memory requestData = _buildRequest(chainId, channel, msgIndex);
uint256 fee_ = IXAPI(XAPI).fee(EXAGGREGATOR);
require(msg.value >= fee_, "!fee");
require(msg.value == fee_, "!fee");
requestId = IXAPI(XAPI).makeRequest{value: fee_}(requestData);
emit XAPIRequestMade(requestId, requestData);
payable(msg.sender).transfer(msg.value - fee_);
}

function xapiCallback(uint256 requestId_, ResponseData memory response) external onlyXAPI {
require(requestId_ == requestId, "requestId");
require(requestId_ == requestId, "!requestId");
if (response.errorCode != 0) {
(uint256 chainId, address channel, uint256 msgIndex, bytes32 msgHash) =
abi.decode(response.result, (uint256, address, uint256, bytes32));
Expand Down

0 comments on commit 4674d31

Please sign in to comment.