Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Untracked] Fix feesPerGas null check & bump up default gas fee multiplier #4

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

Drewmo123
Copy link
Contributor

@Drewmo123 Drewmo123 commented Jan 15, 2025

Summary

When testing ARB-SEPOLIA there were errors running a token-transfer since there were errors getting the gas fee. After looking closer, one of the values being returned maxPriorityFeePerGas was 0. On the next line we did a null check, but based on on JavaScript handles falsly values it treated 0 as false 🙃

So I updated the comparison to explicitly check for null or undefined. I also adjusted the calculations we did with adjustedMaxPriorityFeePerGas so we'd also scale up the value we got from alchemy. Without scaling this up the gas was too low to get accepted, kept getting replacement underpriced responses.

Also bumped up default gas fee to 1.2 multiplier. If at 1 most of the time there are problems sending out a transaction.

Detail

Testing

Documentation


Requested Reviewers: @mention

@Drewmo123 Drewmo123 changed the title [Untracked] Fix fessPerGas null check [Untracked] Fix fessPerGas null check & bump up default gas fee multiplier Jan 15, 2025
@Drewmo123 Drewmo123 force-pushed the andrew/fix-gas-fee-null-check branch 2 times, most recently from 1137381 to 40d74d7 Compare January 15, 2025 20:25
@Drewmo123 Drewmo123 marked this pull request as ready for review January 15, 2025 20:53
@Drewmo123 Drewmo123 changed the title [Untracked] Fix fessPerGas null check & bump up default gas fee multiplier [Untracked] Fix feesPerGas null check & bump up default gas fee multiplier Jan 15, 2025
@Drewmo123 Drewmo123 merged commit 1a48d4f into circlefin:master Jan 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants