-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat(earn): prepare transactions for supply when gas fee is covered #5483
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5483 +/- ##
=======================================
Coverage 86.40% 86.40%
=======================================
Files 761 761
Lines 31365 31374 +9
Branches 5390 5394 +4
=======================================
+ Hits 27101 27109 +8
- Misses 4033 4034 +1
Partials 231 231
Continue to review full report in Codecov by Sentry.
|
src/viem/prepareTransactions.test.ts
Outdated
}) | ||
mocked(estimateGas).mockResolvedValue(BigInt(1_000)) | ||
|
||
// max gas fee is 10 * 10k = 100k units, too high for either fee currency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where do the 10 and 10k come from? should this be 100 (maxFeePerGas) * 1k (gas) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was copy pasted from the previous test...I think you're right. I'll fix it in both!
src/earn/prepareTransactions.test.ts
Outdated
], | ||
}) | ||
) | ||
jest.mocked(getFeatureGate).mockReturnValue(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
specify the feature gate here. E.g., jest.mocked(getFeatureGate).mockImplementation(gate => gate === <gate-name>)
, so this can be cleaned up when removing a gate. Also should this be reset in a beforeEach so it doesn't affect other tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already had it reset in the beforeEach, but I'll do the mockImplementation in both
Description
When gas fees are subsidized:
Test plan
Verified that the transaction goes through when using the syndicate RPC node on mainnet and that the UI works regardless of whether or not the user has enough gas when the feature flag is on.
Related issues
https://linear.app/valora/issue/ACT-1193/new-enter-amount-screen