diff --git a/rust/agents/relayer/src/settings/mod.rs b/rust/agents/relayer/src/settings/mod.rs index 643e2522f..8702fa7a0 100644 --- a/rust/agents/relayer/src/settings/mod.rs +++ b/rust/agents/relayer/src/settings/mod.rs @@ -101,12 +101,12 @@ pub struct GasPaymentEnforcementConf { } #[derive(Debug, Deserialize)] -#[serde(tag = "type", rename_all = "camelCase")] +#[serde(rename_all = "camelCase")] struct RawGasPaymentEnforcementConf { #[serde(flatten)] policy: Option, #[serde(default)] - matching_list: Option, + matching_list: Option, } impl FromRawConf<'_, RawGasPaymentEnforcementConf> for GasPaymentEnforcementConf { @@ -122,13 +122,7 @@ impl FromRawConf<'_, RawGasPaymentEnforcementConf> for GasPaymentEnforcementConf r.parse_config(cwp).take_config_err(&mut err) }); - let matching_list = raw - .matching_list - .and_then(|v| { - serde_json::from_str::(&v) - .take_err(&mut err, || cwp + "matching_list") - }) - .unwrap_or_default(); + let matching_list = raw.matching_list.unwrap_or_default(); err.into_result()?; Ok(Self { policy: policy.unwrap(),