Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
simke9445 committed Jan 15, 2024
1 parent 5e5bf50 commit 3fce65d
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions contracts/warp-controller/src/execute/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::state::{ACCOUNTS, CONFIG, FINISHED_JOBS, PENDING_JOBS};
use crate::ContractError;
use controller::{MigrateAccountsMsg, MigrateJobsMsg, UpdateConfigMsg};

use controller::job::Job;
use cosmwasm_std::{to_binary, DepsMut, Env, MessageInfo, Order, Response, WasmMsg};
use cw_storage_plus::Bound;

Expand Down Expand Up @@ -137,18 +136,13 @@ pub fn migrate_pending_jobs(
.take(msg.limit as usize)
.collect();
let job_keys = job_keys?;
for job_key in job_keys {
for job_key in job_keys.clone() {
let v1_job = PENDING_JOBS().load(deps.storage, job_key)?;

PENDING_JOBS().save(
deps.storage,
job_key,
&v1_job,
)?;
PENDING_JOBS().save(deps.storage, job_key, &v1_job)?;
}

Ok(Response::new()
.add_attribute("refreshed_finished_jobs", job_keys.len().to_string()))
Ok(Response::new().add_attribute("refreshed_finished_jobs", job_keys.len().to_string()))
}

pub fn migrate_finished_jobs(
Expand All @@ -170,16 +164,11 @@ pub fn migrate_finished_jobs(
.take(msg.limit as usize)
.collect();
let job_keys = job_keys?;
for job_key in job_keys {
for job_key in job_keys.clone() {
let v1_job = FINISHED_JOBS().load(deps.storage, job_key)?;

FINISHED_JOBS().save(
deps.storage,
job_key,
&v1_job,
)?;
FINISHED_JOBS().save(deps.storage, job_key, &v1_job)?;
}

Ok(Response::new()
.add_attribute("refreshed_finished_jobs", job_keys.len().to_string()))
Ok(Response::new().add_attribute("refreshed_finished_jobs", job_keys.len().to_string()))
}

0 comments on commit 3fce65d

Please sign in to comment.