-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(activity): show pooled-staking as "Staked/Unstaked Ethereum" #32921
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
Merged
vinnyhoward
merged 3 commits into
main
from
fix-tmcu-1000-activity-staked-ethereum-label
Jul 8, 2026
+132
−78
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
caed802
fix(activity): show pooled-staking as "Staked/Unstaked Ethereum"
vinnyhoward a34570c
Merge branch 'main' of github.com:MetaMask/metamask-mobile into fix-t…
vinnyhoward c7801e5
fix(activity): include 'stake' in Transactions filter and tidy title …
vinnyhoward File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| import { strings } from '../../../../locales/i18n'; | ||
| import type { ActivityKind } from '../../../util/activity-adapters'; | ||
|
|
||
| /** | ||
| * Fallback title resolvers for activity kinds whose title comes straight from an | ||
| * i18n string (perps/predict domain rows). Consumed by `resolveFallbackTitle` in | ||
| * `useActivityListItemRowContent`. | ||
| */ | ||
| export const ACTIVITY_FALLBACK_TITLE_RESOLVERS: Partial< | ||
| Record<ActivityKind, () => string> | ||
| > = { | ||
| predictionsAddFunds: () => | ||
| strings('transactions.activity_prediction_account_funded'), | ||
| predictionsWithdrawFunds: () => | ||
| strings('transactions.activity_prediction_withdrawal'), | ||
| predictionClaimWinnings: () => strings('predict.transactions.claim_title'), | ||
| predictionCashedOut: () => strings('predict.transactions.sell_title'), | ||
| // Design board copy: "Prediction placed" (not the legacy "Predicted"). | ||
| predictionPlaced: () => strings('transactions.activity_prediction_placed'), | ||
| perpsAddFunds: () => strings('transactions.activity_perps_account_funded'), | ||
| perpsWithdraw: () => strings('transactions.activity_perps_withdrawal'), | ||
| perpsOpenLong: () => strings('transactions.activity_perps_open_long'), | ||
| perpsCloseLong: () => strings('transactions.activity_perps_close_long'), | ||
| perpsCloseLongLiquidated: () => | ||
| strings('transactions.activity_perps_close_long_liquidated'), | ||
| perpsCloseLongStopLoss: () => | ||
| strings('transactions.activity_perps_close_long_stop_loss'), | ||
| perpsOpenShort: () => strings('transactions.activity_perps_open_short'), | ||
| perpsCloseShort: () => strings('transactions.activity_perps_close_short'), | ||
| perpsCloseShortLiquidated: () => | ||
| strings('transactions.activity_perps_close_short_liquidated'), | ||
| perpsCloseShortStopLoss: () => | ||
| strings('transactions.activity_perps_close_short_stop_loss'), | ||
| perpsPaidFundingFees: () => | ||
| strings('transactions.activity_perps_paid_funding_fees'), | ||
| perpsReceivedFundingFees: () => | ||
| strings('transactions.activity_perps_received_funding_fees'), | ||
| perpsCloseShortTakeProfit: () => | ||
| strings('transactions.activity_perps_close_short_take_profit'), | ||
| perpsCloseLongTakeProfit: () => | ||
| strings('transactions.activity_perps_close_long_take_profit'), | ||
| marketShort: () => strings('transactions.activity_market_short'), | ||
| stopMarketCloseShort: () => | ||
| strings('transactions.activity_stop_market_close_short'), | ||
| marketCloseShort: () => strings('transactions.activity_market_close_short'), | ||
| limitShort: () => strings('transactions.activity_limit_short'), | ||
| limitCloseShort: () => strings('transactions.activity_limit_close_short'), | ||
| }; | ||
|
|
||
| /** | ||
| * Status verbs for single-token value activities (buy/sell/claim/stake/unstake/ | ||
| * deposit). Keyed by kind so the resolver is a lookup instead of a ternary chain. | ||
| */ | ||
| export const TOKEN_ACTION_LABELS: Record< | ||
| 'buy' | 'sell' | 'claim' | 'stake' | 'unstake' | 'deposit', | ||
| { success: string; pending: string; failed: string } | ||
| > = { | ||
| buy: { success: 'Bought', pending: 'Buying', failed: 'Buy failed' }, | ||
| sell: { success: 'Sold', pending: 'Selling', failed: 'Sell failed' }, | ||
| claim: { success: 'Claimed', pending: 'Claiming', failed: 'Claim failed' }, | ||
| stake: { success: 'Staked', pending: 'Staking', failed: 'Stake failed' }, | ||
| unstake: { | ||
| success: 'Unstaked', | ||
| pending: 'Unstaking', | ||
| failed: 'Unstake failed', | ||
| }, | ||
| deposit: { | ||
| success: 'Deposited', | ||
| pending: 'Depositing', | ||
| failed: 'Deposit failed', | ||
| }, | ||
| }; | ||
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
Pulling out resolvers from
app/components/UI/ActivityListItemRow/useActivityListItemRowContent.ts