Skip to content

Commit

Permalink
[EASY] Remove untagged enum property (#2747)
Browse files Browse the repository at this point in the history
# Description
The gas estimator type seemingly can't be deserialized with the
`untagged` attribute.
While I was at it I also made sure variants get renamed to kebab cast

# Changes
* remove untagged property
* renamed variants to kebab case

## How to test
tested change locally. The strings "web3" and "native" can now be
deserialized.
  • Loading branch information
MartinquaXD authored May 16, 2024
1 parent 085e995 commit 4a6f155
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/driver/src/infra/config/file/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ fn default_http_timeout() -> Duration {
}

#[derive(Clone, Debug, Deserialize, Default)]
#[serde(untagged, deny_unknown_fields)]
#[serde(rename_all = "kebab-case", deny_unknown_fields)]
pub enum GasEstimatorType {
#[default]
Native,
Expand Down

0 comments on commit 4a6f155

Please sign in to comment.