Skip to content

Commit

Permalink
update status to response_status
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoury committed Aug 29, 2024
1 parent 7f2495b commit b94c1bc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rooch/sources/oracles.move
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module verity::oracles {
params: HTTPRequest,
pick: String, // An optional JQ string to pick the value from the response JSON data structure.
oracle: address,
status: u8,
response_status: u8,
response: Option<String>
}

Expand Down Expand Up @@ -153,7 +153,7 @@ module verity::oracles {
public entry fun fulfil_request(
sender: &signer,
id: ObjectID,
status:u8,
status: u8,
result: String
// proof: String
) {
Expand All @@ -170,7 +170,7 @@ module verity::oracles {

// Fulfil the request
request.response = option::some(result);
request.status = status;
request.response_status = status;

// TODO: Move gas from module escrow to Oracle

Expand Down Expand Up @@ -229,6 +229,11 @@ module verity::oracles {
let request = borrow_request(id);
request.response
}

public fun get_response_status(id: &ObjectID): Option<String> {
let request = borrow_request(id);
request.response_status
}
}

#[test_only]
Expand Down

0 comments on commit b94c1bc

Please sign in to comment.