Skip to content

Commit

Permalink
chore: remove extra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushtom committed Apr 18, 2024
1 parent 6c97b8f commit f2211a5
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/endpoints/quests/starknetid/verify_socials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub async fn handler(
) -> Result<(StatusCode, Json<serde_json::Value>), String> {
let task_id = 6;
let addr = &query.addr;

let domain_res = call_contract_helper(
&state,
state.conf.starknetid_contracts.naming_contract,
Expand All @@ -64,22 +65,14 @@ pub async fn handler(
let id_res = call_contract_helper(
&state,
state.conf.starknetid_contracts.naming_contract,
selector!("domain_to_token_id"),
selector!("domain_to_id"),
domain_res,
)
.await?;


let mut twitter = false;
let mut discord = false;

for verifier_contract in &state.conf.starknetid_contracts.verifier_contracts {
let calldata = vec![
id_res[0],
short_string!("discord"),
*verifier_contract,
FieldElement::ZERO,
];
let twitter_verifier_data = call_contract_helper(
&state,
state.conf.starknetid_contracts.identity_contract,
Expand Down Expand Up @@ -108,8 +101,6 @@ pub async fn handler(
],
)
.await?;


if discord_verifier_data[0] != felt!("0") {
discord = true;
}
Expand All @@ -131,4 +122,4 @@ pub async fn handler(
Ok(val) => val.into_response(),
Err(err) => get_error(err),
}
}
}

0 comments on commit f2211a5

Please sign in to comment.