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

feat(earn): handle claims in withdraw submit saga #6203

Merged
merged 184 commits into from
Nov 8, 2024
Merged

feat(earn): handle claims in withdraw submit saga #6203

merged 184 commits into from
Nov 8, 2024

Conversation

MuckT
Copy link
Collaborator

@MuckT MuckT commented Oct 31, 2024

Description

Adds claim handling to the withdrawSubmitSaga in src/earn/saga.ts to handle pending claim transactions. This PR also includes a fix where withdrawals that include claims do not prepare or include a separate claim transaction.

Test plan

  • Tested locally
  • Unit tests updated

Related issues

Backwards compatibility

Yes

Network scalability

N/A

MuckT and others added 30 commits October 2, 2024 15:08
# Conflicts:
#	src/earn/EarnDepositBottomSheet.tsx
Co-authored-by: Finnian Jacobson-Schulte <140328381+finnian0826@users.noreply.github.com>
src/earn/saga.ts Outdated
@@ -456,7 +463,132 @@ export function* withdrawSubmitSaga(action: PayloadAction<WithdrawInfo>) {
}
}

export function* claimSubmitSaga(action: PayloadAction<WithdrawInfo>) {
Copy link
Contributor

@jh2oman jh2oman Nov 6, 2024

Choose a reason for hiding this comment

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

I disagree with the choice to make this its own function. The vast majority of it is copy/paste and doing the exact steps as withdrawSubmitSaga. I don't think there is a strong motivation to separate them for separation of concerns, because their concerns are very close. Code-wise it looks like you will need to add two if statements max to withdrawSubmitSaga to be able to make it optionally include withdraw transactions or not.

am i missing something here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Refactored in 7f56a57 tests added in 1cb1d86.

@MuckT MuckT changed the title feat(earn): claim submit saga feat(earn): handle claims in withdraw submit saga Nov 6, 2024
src/earn/saga.ts Outdated Show resolved Hide resolved
src/earn/saga.ts Outdated Show resolved Hide resolved
Base automatically changed from tomm/act-1389-1 to main November 8, 2024 00:39
# Conflicts:
#	src/earn/EarnConfirmationScreen.test.tsx
#	src/earn/EarnConfirmationScreen.tsx
#	src/earn/hooks.ts
@MuckT MuckT enabled auto-merge November 8, 2024 00:54
@MuckT MuckT added this pull request to the merge queue Nov 8, 2024
Merged via the queue into main with commit 8ea0f61 Nov 8, 2024
15 checks passed
@MuckT MuckT deleted the tomm/act-1389-2 branch November 8, 2024 05:27
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.

3 participants