refactor(hyperswitch_constraint_graph): Removal of lifetime from the Constraint Graph framework (#5132)

This commit is contained in:
Prajjwal Kumar
2024-06-28 15:06:47 +05:30
committed by GitHub
parent bb9a97154c
commit 6df8f0646b
10 changed files with 104 additions and 86 deletions

View File

@ -33,12 +33,12 @@ use wasm_bindgen::prelude::*;
use crate::utils::JsResultExt;
type JsResult = Result<JsValue, JsValue>;
struct SeedData<'a> {
cgraph: hyperswitch_constraint_graph::ConstraintGraph<'a, dir::DirValue>,
struct SeedData {
cgraph: hyperswitch_constraint_graph::ConstraintGraph<dir::DirValue>,
connectors: Vec<ast::ConnectorChoice>,
}
static SEED_DATA: OnceCell<SeedData<'_>> = OnceCell::new();
static SEED_DATA: OnceCell<SeedData> = OnceCell::new();
static SEED_FOREX: OnceCell<currency_conversion_types::ExchangeRates> = OnceCell::new();
/// This function can be used by the frontend to educate wasm about the forex rates data.