mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
feat(core): Constraint Graph for Payment Methods List (#5081)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -194,7 +194,7 @@ where
|
||||
nodes: &[(NodeId, Relation, Strength)],
|
||||
info: Option<&'static str>,
|
||||
metadata: Option<M>,
|
||||
domain: Option<String>,
|
||||
domain_id: Option<DomainId>,
|
||||
) -> Result<NodeId, GraphError<V>> {
|
||||
nodes
|
||||
.iter()
|
||||
@ -208,13 +208,7 @@ where
|
||||
.push(metadata.map(|meta| -> Arc<dyn Metadata> { Arc::new(meta) }));
|
||||
|
||||
for (node_id, relation, strength) in nodes {
|
||||
self.make_edge(
|
||||
*node_id,
|
||||
aggregator_id,
|
||||
*strength,
|
||||
*relation,
|
||||
domain.clone(),
|
||||
)?;
|
||||
self.make_edge(*node_id, aggregator_id, *strength, *relation, domain_id)?;
|
||||
}
|
||||
|
||||
Ok(aggregator_id)
|
||||
@ -225,7 +219,7 @@ where
|
||||
nodes: &[(NodeId, Relation, Strength)],
|
||||
info: Option<&'static str>,
|
||||
metadata: Option<M>,
|
||||
domain: Option<String>,
|
||||
domain_id: Option<DomainId>,
|
||||
) -> Result<NodeId, GraphError<V>> {
|
||||
nodes
|
||||
.iter()
|
||||
@ -239,13 +233,7 @@ where
|
||||
.push(metadata.map(|meta| -> Arc<dyn Metadata> { Arc::new(meta) }));
|
||||
|
||||
for (node_id, relation, strength) in nodes {
|
||||
self.make_edge(
|
||||
*node_id,
|
||||
aggregator_id,
|
||||
*strength,
|
||||
*relation,
|
||||
domain.clone(),
|
||||
)?;
|
||||
self.make_edge(*node_id, aggregator_id, *strength, *relation, domain_id)?;
|
||||
}
|
||||
|
||||
Ok(aggregator_id)
|
||||
|
||||
@ -158,14 +158,6 @@ impl From<String> for DomainIdentifier {
|
||||
}
|
||||
}
|
||||
|
||||
// impl Deref for DomainIdentifier {
|
||||
// type Target = &String;
|
||||
//
|
||||
// fn deref(&self) -> Self::Target {
|
||||
// self.0
|
||||
// }
|
||||
// }
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct DomainInfo {
|
||||
pub domain_identifier: DomainIdentifier,
|
||||
|
||||
Reference in New Issue
Block a user