diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs index 81e50b020e73..c2969a166125 100644 --- a/crates/api_models/src/enums.rs +++ b/crates/api_models/src/enums.rs @@ -430,6 +430,7 @@ pub enum FieldType { UserCountryCode, //phone number's country code UserCountry { options: Vec }, //for country inside payment method data ex- bank redirect UserCurrency { options: Vec }, + UserCryptoCurrencyNetwork, //for crypto network associated with the cryptopcurrency UserBillingName, UserAddressLine1, UserAddressLine2, @@ -504,6 +505,7 @@ impl PartialEq for FieldType { options: options_other, }, ) => options_self.eq(options_other), + (Self::UserCryptoCurrencyNetwork, Self::UserCryptoCurrencyNetwork) => true, (Self::UserBillingName, Self::UserBillingName) => true, (Self::UserAddressLine1, Self::UserAddressLine1) => true, (Self::UserAddressLine2, Self::UserAddressLine2) => true, diff --git a/crates/router/src/configs/defaults.rs b/crates/router/src/configs/defaults.rs index 7177488cb3cc..2c02dddaab0a 100644 --- a/crates/router/src/configs/defaults.rs +++ b/crates/router/src/configs/defaults.rs @@ -8303,7 +8303,7 @@ impl Default for super::settings::RequiredFields { RequiredFieldInfo { required_field: "payment_method_data.crypto.network".to_string(), display_name: "network".to_string(), - field_type: enums::FieldType::Text, + field_type: enums::FieldType::UserCryptoCurrencyNetwork, value: None, } ), diff --git a/openapi/openapi_spec.json b/openapi/openapi_spec.json index 560f61bc2652..87f05f3b6755 100644 --- a/openapi/openapi_spec.json +++ b/openapi/openapi_spec.json @@ -9296,6 +9296,12 @@ } } }, + { + "type": "string", + "enum": [ + "user_crypto_currency_network" + ] + }, { "type": "string", "enum": [