mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
refactor(graph): refactor the Knowledge Graph to include configs check, while eligibility analysis (#4687)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -91,8 +91,12 @@ pub fn seed_knowledge_graph(mcas: JsValue) -> JsResult {
|
||||
.collect::<Result<_, _>>()
|
||||
.map_err(|_| "invalid connector name received")
|
||||
.err_to_js()?;
|
||||
|
||||
let mca_graph = kgraph_utils::mca::make_mca_graph(mcas).err_to_js()?;
|
||||
let pm_filter = kgraph_utils::types::PaymentMethodFilters(HashMap::new());
|
||||
let config = kgraph_utils::types::CountryCurrencyFilter {
|
||||
connector_configs: HashMap::new(),
|
||||
default_configs: Some(pm_filter),
|
||||
};
|
||||
let mca_graph = kgraph_utils::mca::make_mca_graph(mcas, &config).err_to_js()?;
|
||||
let analysis_graph =
|
||||
hyperswitch_constraint_graph::ConstraintGraph::combine(&mca_graph, &truth::ANALYSIS_GRAPH)
|
||||
.err_to_js()?;
|
||||
|
||||
Reference in New Issue
Block a user