Skip to content

Commit

Permalink
feat: P-1006 add new Assertion enum item LinkedIdentities (#3042)
Browse files Browse the repository at this point in the history
Co-authored-by: higherordertech <higherordertech>
  • Loading branch information
wli-pro authored Sep 4, 2024
1 parent 1fb33f9 commit 32a0c7b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions primitives/core/src/assertion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ pub enum Assertion {
NftHolder(Web3NftType),

#[codec(index = 27)]
Dynamic(DynamicParams)
Dynamic(DynamicParams),

#[codec(index = 28)]
LinkedIdentities,
}

const A8_SUPPORTED_NETWORKS: [Web3Network; 5] = [
Expand Down Expand Up @@ -196,7 +199,11 @@ impl Assertion {
// any web3 network is allowed
Self::A1 | Self::A13(..) | Self::A20 => all_web3networks(),
// no web3 network is allowed
Self::A2(..) | Self::A3(..) | Self::A6 | Self::GenericDiscordRole(..) => vec![],
Self::A2(..)
| Self::A3(..)
| Self::A6
| Self::GenericDiscordRole(..)
| Self::LinkedIdentities => vec![],
Self::TokenHoldingAmount(t_type) => t_type.get_supported_networks(),
Self::PlatformUser(p_type) => p_type.get_supported_networks(),
Self::NftHolder(t_type) => t_type.get_supported_networks(),
Expand All @@ -209,7 +216,7 @@ impl Assertion {
#[allow(clippy::match_like_matches_macro)]
pub fn skip_identity_filtering(&self) -> bool {
match self {
Self::A1 | Self::Dynamic(..) => true,
Self::A1 | Self::Dynamic(..) | Self::LinkedIdentities => true,
_ => false,
}
}
Expand Down

0 comments on commit 32a0c7b

Please sign in to comment.