feat: add Claim button for empty cash section#27909
Draft
PatrykLucka wants to merge 3 commits intomainfrom
Draft
feat: add Claim button for empty cash section#27909PatrykLucka wants to merge 3 commits intomainfrom
PatrykLucka wants to merge 3 commits intomainfrom
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
c00bffe to
0efc195
Compare
Contributor
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - draft PR All E2E tests pre-selected. |
|
Contributor
|
✅ E2E Fixture Validation — Schema is up to date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Reason: Users with no mUSD balance but a claimable Merkl bonus only saw the claim flow after drilling into the aggregated mUSD row / asset overview. The home Cash empty state did not surface a claim action, and claim failures could occur with little feedback.
Solution:
CashGetMusdEmptyState(homepage Cash section and Cash full view empty state): wiresuseMerklBonusClaimwith sharedLINEA_MUSD_ASSET_FOR_MERKL, shows a full-width secondary Claim CTA when there is a claimable reward and no pending claim.earn.claim_bonus_with_fiatso the label includes the amount formatted withformatWithThreshold+getLocaleLanguageCode(), converting Merkl’s USD amount with the same USD → selected fiat basis as the mUSD price row (oneUsdInUserFiatfrom mainnet currency rates).useMerklClaimTransactionare surfaced viauseMerklBonusClaimaserrorand a plain toast on the empty state when a claim attempt fails.useMerklClaimTransaction: if the first Merkl fetch returns no reward data, clears the in-memory Merkl cache and retries once to avoid stale empty cache vs. display.MusdAggregatedRow: reusesLINEA_MUSD_ASSET_FOR_MERKLfrom constants; row press always navigates to Mainnet mUSD asset details (no longer branches to Cash full view when the user has mUSD).CashGetMusdEmptyState,useMerklBonusClaim,useMerklClaimTransaction, and Homepage mocks updated as needed.claim_bonus_with_fiat(and aligned keys where added) for the new string.Changelog
CHANGELOG entry: Added a Claim bonus action on the home Cash section when users have no mUSD but have a claimable Merkl bonus, with the amount shown in the selected fiat currency.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist