Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
fix: add job_id to RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
gitsimon committed Feb 8, 2024
1 parent ce0299d commit 8bb78b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pallets/marketplace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,11 @@ pub mod pallet {
.map(|(job_id, assignment)| {
let job = <StoredJobRegistration<T>>::get(&job_id.0, &job_id.1)
.ok_or(RuntimeApiError::MatchedJobs)?;
Ok(JobAssignment { job, assignment })
Ok(JobAssignment {
job_id,
job,
assignment,
})
})
.collect()
}
Expand Down
1 change: 1 addition & 0 deletions pallets/marketplace/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub struct Assignment<Reward> {
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
pub struct JobAssignment<Reward, AccountId, MaxAllowedSources: Get<u32>, Extra> {
pub job_id: JobId<AccountId>,
pub job: JobRegistration<AccountId, MaxAllowedSources, Extra>,
pub assignment: Assignment<Reward>,
}
Expand Down

0 comments on commit 8bb78b0

Please sign in to comment.