Skip to content

Commit

Permalink
ok instead of error on false condition resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
vladjdk committed Sep 11, 2023
1 parent b455a71 commit 249127f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion contracts/warp-controller/src/execute/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,11 @@ pub fn execute_job(
} else {
attrs.push(Attribute::new("job_condition_status", "valid"));
if !resolution? {
return Err(ContractError::JobNotActive {});
return Ok(Response::new()
.add_attribute("action", "execute_job", )
.add_attribute("condition", "false")
.add_attribute("job_id", job.id)
);
}

submsgs.push(SubMsg {
Expand Down Expand Up @@ -412,6 +416,7 @@ pub fn execute_job(
.add_submessages(submsgs)
.add_message(reward_msg)
.add_attribute("action", "execute_job")
.add_attribute("condition", "true")
.add_attribute("executor", info.sender)
.add_attribute("job_id", job.id)
.add_attribute("job_reward", job.reward)
Expand Down

0 comments on commit 249127f

Please sign in to comment.