Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(euclid_wasm): update dependency for wasm in validate.rs (#6262)

Sakil Mostakcc7c17f873ef
diff --git a/Cargo.lock b/Cargo.lock
index cdab5a05c4..26ad619ee0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1846,6 +1846,7 @@ dependencies = [
"common_utils",
"error-stack",
"masking",
+ "once_cell",
"regex",
"router_env",
"serde",
diff --git a/Makefile b/Makefile
index e64f0c5bcb..7614ff25ca 100644
--- a/Makefile
+++ b/Makefile
@@ -84,7 +84,7 @@ clippy :
# make euclid-wasm
euclid-wasm:
- wasm-pack build --target web --out-dir $(ROOT_DIR)/wasm --out-name euclid $(ROOT_DIR)/crates/euclid_wasm -- --features dummy_connector
+ wasm-pack build --target web --out-dir $(ROOT_DIR)/wasm --out-name euclid $(ROOT_DIR)/crates/euclid_wasm -- --features dummy_connector,v1
# Run Rust tests of project.
#
diff --git a/crates/cards/Cargo.toml b/crates/cards/Cargo.toml
index b6b9f2b886..1d194e8690 100644
--- a/crates/cards/Cargo.toml
+++ b/crates/cards/Cargo.toml
@@ -11,6 +11,7 @@ license.workspace = true
[dependencies]
error-stack = "0.4.1"
+once_cell = "1.19.0"
serde = { version = "1.0.197", features = ["derive"] }
thiserror = "1.0.58"
time = "0.3.35"
diff --git a/crates/cards/src/validate.rs b/crates/cards/src/validate.rs
index de45026989..d3515ef02f 100644
--- a/crates/cards/src/validate.rs
+++ b/crates/cards/src/validate.rs
@@ -3,8 +3,8 @@ use std::{collections::HashMap, fmt, ops::Deref, str::FromStr};
use common_utils::errors::ValidationError;
use error_stack::report;
use masking::{PeekInterface, Strategy, StrongSecret, WithType};
+use once_cell::sync::Lazy;
use regex::Regex;
-use router_env::once_cell::sync::Lazy;
#[cfg(not(target_arch = "wasm32"))]
use router_env::{logger, which as router_env_which, Env};
use serde::{Deserialize, Deserializer, Serialize};