metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

[Bug]: Transaction Status "signed" Displays Incorrectly - Missing Capitalization and Inconsistent Styling

Open chaoticgoodpanda opened this issue 1 year ago • 2 comments

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

Image

Steps to reproduce

  1. Open MetaMask Mobile
  2. Navigate to the Activity tab (transaction history)
  3. Locate a transaction with status "signed"
  4. 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:

  1. Missing Localization Entry: The locales/languages/en.json file is missing a "signed": "Signed" entry in the transaction section
  2. Missing Switch Case: The StatusText component 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

  1. Localization: Adding "signed": "Signed" ensures the status displays with proper capitalization
  2. Consistent Styling: Using PendingText component applies the same bold styling and warning color used for other pending-type statuses
  3. 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

chaoticgoodpanda avatar Sep 05 '25 15:09 chaoticgoodpanda

Cannot reproduce. It looks like it has been fixed with some other issue.

PatrykLucka avatar Nov 12 '25 13:11 PatrykLucka

@chaoticgoodpanda can you please confirm it has been fixed and close the issue?

PatrykLucka avatar Nov 12 '25 13:11 PatrykLucka