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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(wasm): Removing router env dependency from api models crate (#11177)
Sayak Bhattacharyaa1b064b371d6
diff --git a/Cargo.lock b/Cargo.lockindex 317e1084cd..5db8a483ef 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -472,7 +472,6 @@ dependencies = ["nutype","reqwest 0.11.27","router_derive",- "router_env","serde","serde_json","smithy",diff --git a/crates/api_models/Cargo.toml b/crates/api_models/Cargo.tomlindex 98eb4e41ff..5c1c426309 100644--- a/crates/api_models/Cargo.toml+++ b/crates/api_models/Cargo.toml@@ -23,7 +23,6 @@ revenue_recovery = ["dep:actix-multipart"]tokenization_v2 = ["common_utils/tokenization_v2"][dependencies]-router_env = { version = "0.1.0", path = "../router_env", features = ["log_extra_implicit_fields", "log_custom_entries_to_extra"] }actix-multipart = { version = "0.6.2", optional = true }actix-web = { version = "4.11.0", optional = true }csv = "1.3"diff --git a/crates/api_models/src/customers.rs b/crates/api_models/src/customers.rsindex 0d1771185c..186845e0fb 100644--- a/crates/api_models/src/customers.rs+++ b/crates/api_models/src/customers.rs@@ -500,7 +500,9 @@ pub struct CustomerDocumentDetails {}impl CustomerDocumentDetails {- pub fn from(value: &Option<pii::SecretSerdeValue>) -> Result<Option<Self>, ParsingError> {+ pub fn from(+ value: &Option<pii::SecretSerdeValue>,+ ) -> common_utils::errors::CustomResult<Option<Self>, ParsingError> {value.as_ref().map(|pii_value| {@@ -508,17 +510,9 @@ impl CustomerDocumentDetails {.peek().clone().parse_value::<Self>("CustomerDocumentDetails")- .map_err(|err| {- router_env::logger::error!(- parsing_error = ?err,- "Failed to parse CustomerDocumentDetails"- );- ParsingError::StructParseFailure("CustomerDocumentDetails")- })}).transpose()}-pub fn to(&self) -> common_utils::errors::CustomResult<pii::SecretSerdeValue, ParsingError> {self.encode_to_value().map(Secret::new)}