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

fix: 🐛 use a counter to show if there are pending transactions #26116

Merged
merged 7 commits into from
Aug 1, 2024
3 changes: 1 addition & 2 deletions app/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ import { TRIGGER_TYPES } from './controllers/metamask-notifications/constants/no
const BADGE_COLOR_APPROVAL = '#0376C9';
// eslint-disable-next-line @metamask/design-tokens/color-no-hex
const BADGE_COLOR_NOTIFICATION = '#D73847';
const BADGE_LABEL_APPROVAL = '\u22EF'; // unicode ellipsis
const BADGE_MAX_NOTIFICATION_COUNT = 9;

// Setup global hook for improved Sentry state snapshots during initialization
Expand Down Expand Up @@ -988,7 +987,7 @@ export function setupController(
let badgeColor = BADGE_COLOR_APPROVAL;

if (pendingApprovalCount) {
label = BADGE_LABEL_APPROVAL;
label = String(pendingApprovalCount);
Prithpal-Sooriya marked this conversation as resolved.
Show resolved Hide resolved
} else if (unreadNotificationsCount > 0) {
label =
unreadNotificationsCount > BADGE_MAX_NOTIFICATION_COUNT
Expand Down