Skip to content

Commit

Permalink
filter out web2 identites (#2398)
Browse files Browse the repository at this point in the history
  • Loading branch information
outofxxx committed Jan 10, 2024
1 parent 01d364e commit 68f4237
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tee-worker/litentry/core/assertion-build/src/lit_staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,12 @@ pub fn build(req: &AssertionBuildRequest) -> Result<Credential> {
debug!("Assertion building LIT staking amount");

let mut identities = vec![];
req.identities.iter().for_each(|identity| {
identities.push(identity.0.clone());
});
req.identities
.iter()
.filter(|(identity, _)| identity.is_substrate())
.for_each(|identity| {
identities.push(identity.0.clone());
});

let mut client = LitentryStakingClient::new();
let staking_amount = DelegatorState.query_lit_staking(&mut client, &identities)?;
Expand Down

0 comments on commit 68f4237

Please sign in to comment.