-
Notifications
You must be signed in to change notification settings - Fork 96
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 and use on confirmation screen #6192
Conversation
# Conflicts: # src/earn/EarnDepositBottomSheet.tsx
Co-authored-by: Finnian Jacobson-Schulte <140328381+finnian0826@users.noreply.github.com>
@@ -93,16 +92,22 @@ export async function prepareDepositTransactions({ | |||
} | |||
} | |||
|
|||
export async function prepareWithdrawAndClaimTransactions({ | |||
pool, | |||
export async function prepareWithdrawTransactionsWithSwap({ |
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.
@satish-ravi Tried a few ways to make this work without having this additional function but came up short.
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.
you can still avoid duplicating the fn by calling prepareWithdrawTransactions
from this function and adjusting the response type right? Similar to how we did in our pairing session except we did it with an inline function in the hook instead of an exported function with explicit args
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.
Was able to make this change in 8cffb5b and it is a lot cleaner. I tried to do something similar with prepareWithdrawAndClaimTransactions
, but ran into issues merging the prepareTransactionsResult
objects.
Description
Handles the preparation of all earn transactions via a shared hook that's used on both
EarnEnterAmount.tsx
&EarnConfirmationScreen.tsx
.Test plan
Related issues
Backwards compatibility
Yes
Network scalability
N/A