Skip to content

Commit

Permalink
Fix unwrapping style
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianBland committed May 31, 2024
1 parent 9e2e423 commit 2f99828
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/primitives/src/chain/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1647,11 +1647,10 @@ impl OptimismGenesisInfo {
.as_object()
.and_then(|obj| obj.get("eip1559Denominator").and_then(|value| value.as_u64()))
});
let base_fee_params = if eip1559_elasticity.is_some() && eip1559_denominator.is_some() {
BaseFeeParams::new(
eip1559_denominator.unwrap() as u128,
eip1559_elasticity.unwrap() as u128,
)
let base_fee_params = if let (Some(elasticity), Some(denominator)) =
(eip1559_elasticity, eip1559_denominator)
{
BaseFeeParams::new(denominator as u128, elasticity as u128)
} else {
BaseFeeParams::ethereum()
};
Expand Down

0 comments on commit 2f99828

Please sign in to comment.