Skip to content

Commit

Permalink
Removed missing bits of rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsanchezq authored and mzabaluev committed Jul 26, 2021
1 parent b86e88a commit 5eb1c2c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
5 changes: 1 addition & 4 deletions src/bin/cli/ideascale/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use catalyst_toolbox::ideascale::{
build_challenges, build_fund, build_proposals, fetch_all, Error, Rewards,
build_challenges, build_fund, build_proposals, fetch_all, Error,
};

use structopt::StructOpt;
Expand Down Expand Up @@ -75,9 +75,6 @@ impl Import {
let idescale_data =
futures::executor::block_on(runtime.spawn(fetch_all(*fund, api_token.clone())))??;

let rewards: Rewards =
serde_json::from_reader(jcli_lib::utils::io::open_file_read(&Some(rewards))?)?;

let funds = build_fund(&idescale_data, *threshold, rewards_info.clone());
let challenges = build_challenges(&idescale_data);
let proposals = build_proposals(&idescale_data, &chain_vote_type.to_string(), *fund);
Expand Down
4 changes: 0 additions & 4 deletions src/ideascale/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ pub struct IdeaScaleData {
scores: Scores,
}

pub type Rewards = HashMap<i32, i64>;

pub async fn fetch_all(fund: usize, api_token: String) -> Result<IdeaScaleData, Error> {
let funnels_task = tokio::spawn(fetch::get_funnels_data_for_fund(api_token.clone()));
let funds_task = tokio::spawn(fetch::get_funds_data(api_token.clone()));
Expand Down Expand Up @@ -120,8 +118,6 @@ pub fn build_challenges(ideascale_data: &IdeaScaleData) -> Vec<models::se::Chall
description: c.description.clone(),
fund_id: c.fund_id.to_string(),
id: c.id.to_string(),
// TODO: proposers_rewards to be removed
proposers_rewards: "".to_string(),
rewards_total: c.rewards.clone(),
title: c.title.clone(),
})
Expand Down
1 change: 0 additions & 1 deletion src/ideascale/models/se.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pub struct Challenge {
pub description: String,
pub fund_id: String,
pub id: String,
pub proposers_rewards: String,
pub rewards_total: String,
pub title: String,
}
Expand Down

0 comments on commit 5eb1c2c

Please sign in to comment.