[Bug]: Transaction Status "signed" Displays Incorrectly - Missing Capitalization and Inconsistent Styling
Describe the bug
The transaction status "signed" appears incorrectly in the Activity/Transactions history page with inconsistent formatting compared to other transaction statuses like "Confirmed", "Pending", and "Failed". The status displays as lowercase "signed" instead of capitalized "Signed" and may have different font styling.
Expected behavior
- Transaction status should display as "Signed" (capitalized)
- Font styling should be consistent with other transaction statuses (bold, appropriately colored)
- All transaction statuses should follow the same design system
Screenshots/Recordings
Steps to reproduce
- Open MetaMask Mobile
- Navigate to the Activity tab (transaction history)
- Locate a transaction with status "signed"
- Compare the formatting with other transaction statuses like "Confirmed", "Pending", "Failed"
Error messages or log output
Detection stage
During release testing
Version
7.56.0
Build type
None
Device
Pixel 8a
Operating system
Android
Additional context
Root Cause Analysis
The issue occurs in two places:
- Missing Localization Entry: The
locales/languages/en.jsonfile is missing a"signed": "Signed"entry in thetransactionsection - Missing Switch Case: The
StatusTextcomponent doesn't handle the'signed'case, causing it to fall through to the default case which displays the raw status string
Detailed Code Fix
1. Add Missing Localization Entry
File: locales/languages/en.json
Location: Line ~2689 in the transaction section
"transaction": {
"transaction_id": "Transaction ID",
// ... existing entries ...
"confirmed": "Confirmed",
"pending": "Pending",
"submitted": "Submitted",
"failed": "Failed",
"cancelled": "Cancelled",
+ "signed": "Signed"
}
2. Add Switch Case to StatusText Component
File: app/components/Base/StatusText.js
Location: Add after line 80, before the FIAT_ORDER_STATES cases
function StatusText({ status, context, testID, ...props }) {
switch (status) {
case 'Confirmed':
case 'confirmed':
return (
<ConfirmedText testID={testID} {...props}>
{strings(`${context}.${status}`)}
</ConfirmedText>
);
case 'Pending':
case 'pending':
case 'Submitted':
case 'submitted':
return (
<PendingText testID={testID} {...props}>
{strings(`${context}.${status}`)}
</PendingText>
);
+ case 'signed':
+ case 'Signed':
+ return (
+ <PendingText testID={testID} {...props}>
+ {strings(`${context}.${status}`)}
+ </PendingText>
+ );
case 'Failed':
case 'Cancelled':
case 'failed':
case 'cancelled':
return (
<FailedText testID={testID} {...props}>
{strings(`${context}.${status}`)}
</FailedText>
);
// ... rest of cases
}
}
Why This Fix Works
- Localization: Adding
"signed": "Signed"ensures the status displays with proper capitalization - Consistent Styling: Using
PendingTextcomponent applies the same bold styling and warning color used for other pending-type statuses - Future-proof: Handles both
'signed'and'Signed'cases for robustness
Alternative Styling Option
If "signed" should have different styling than pending states, create a dedicated styled component:
export const SignedText = ({ testID, ...props }) => {
const { colors } = useTheme();
return (
<Text
testID={testID}
bold
style={[styles.status, { color: colors.primary.default }]}
{...props}
/>
);
};
Testing
- [ ] Verify "signed" status displays as "Signed"
- [ ] Confirm styling matches other transaction statuses
- [ ] Test both uppercase and lowercase status inputs
- [ ] Verify no regressions in other transaction status displays
Cannot reproduce. It looks like it has been fixed with some other issue.
@chaoticgoodpanda can you please confirm it has been fixed and close the issue?