Skip to content

fix: add is dynamic fee fn#5546

Merged
mattsse merged 1 commit intofoundry-rs:masterfrom
mattsse:matt/dynamic-fee-cond
Aug 5, 2023
Merged

fix: add is dynamic fee fn#5546
mattsse merged 1 commit intofoundry-rs:masterfrom
mattsse:matt/dynamic-fee-cond

Conversation

@mattsse
Copy link
Member

@mattsse mattsse commented Aug 5, 2023

regression in #5534 where type was removed

this changes the if condition by add a is_dynamic_fee and not resetting the tx type in the else branch

cc @DaniPopes

@mattsse mattsse requested a review from Evalir August 5, 2023 20:39
@mattsse mattsse added the C-anvil Command: anvil label Aug 5, 2023
Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet this makes sense

let mut transaction: Transaction = eth_transaction.clone().into();

if let TypedTransaction::EIP1559(_) = eth_transaction.as_ref() {
if eth_transaction.is_dynamic_fee() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right, this properly "inverts" the check that used to happen below with !is_eip1559

@mattsse mattsse merged commit ffa77b4 into foundry-rs:master Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-anvil Command: anvil

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants