Adding notification for updated seed phrase wording (#11131)

* Adding notification for updated seed phrase wording

* Updating e2e notification state

* Always displaying image for swaps notification
feature/default_network_editable
ryanml 4 years ago committed by GitHub
parent 0c931a7c6d
commit b7a1c8c302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/_locales/en/messages.json
  2. 13
      shared/notifications/index.js
  3. 4
      test/e2e/fixtures/address-entry/state.json
  4. 4
      test/e2e/fixtures/connected-state/state.json
  5. 4
      test/e2e/fixtures/custom-rpc/state.json
  6. 4
      test/e2e/fixtures/import-ui/state.json
  7. 4
      test/e2e/fixtures/imported-account/state.json
  8. 4
      test/e2e/fixtures/localization/state.json
  9. 4
      test/e2e/fixtures/metrics-enabled/state.json
  10. 4
      test/e2e/fixtures/send-edit/state.json
  11. 4
      test/e2e/fixtures/threebox-enabled/state.json
  12. 9
      ui/components/app/whats-new-popup/whats-new-popup.js
  13. 1
      ui/selectors/selectors.js

@ -1288,6 +1288,10 @@
"message": "Swap on Binance Smart Chain",
"description": "Title for a notification in the 'See What's New' popup. Encourages users to do swaps on Binance Smart Chain."
},
"notifications5Description": {
"message": "Your \"Seed Phrase\" is now called your \"Secret Recovery Phrase.\"",
"description": "Description of a notification in the 'See What's New' popup. Describes the seed phrase wording update."
},
"ofTextNofM": {
"message": "of"
},

@ -22,6 +22,10 @@ export const UI_NOTIFICATIONS = {
width: '100%',
},
},
5: {
id: 5,
date: '2021-05-18',
},
};
export const getTranslatedUINoficiations = (t, locale) => {
@ -53,5 +57,14 @@ export const getTranslatedUINoficiations = (t, locale) => {
new Date(UI_NOTIFICATIONS[4].date),
),
},
5: {
...UI_NOTIFICATIONS[5],
title: t('walletSeed'),
description: t('notifications5Description'),
actionText: t('notifications3ActionText'),
date: new Intl.DateTimeFormat(locale).format(
new Date(UI_NOTIFICATIONS[5].date),
),
},
};
};

@ -55,10 +55,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -45,10 +45,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -41,10 +41,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -96,10 +96,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -41,10 +41,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -41,10 +41,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -45,10 +45,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -42,10 +42,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -52,10 +52,10 @@
"1": {
"isShown": true
},
"2": {
"3": {
"isShown": true
},
"3": {
"5": {
"isShown": true
}
}

@ -30,6 +30,12 @@ function getActionFunctionById(id, history) {
updateViewedNotifications({ 4: true });
history.push(BUILD_QUOTE_ROUTE);
},
5: () => {
updateViewedNotifications({ 5: true });
global.platform.openTab({
url: 'https://metamask.zendesk.com/hc/en-us/articles/360060826432',
});
},
};
return actionFunctions[id];
@ -174,7 +180,8 @@ export default function WhatsNewPopup({ onClose }) {
<div className="whats-new-popup__notifications">
{notifications.map(({ id }, index) => {
const notification = getTranslatedUINoficiations(t, locale)[id];
return index === 0
// Display the swaps notification with full image
return index === 0 || id === 1
? renderFirstNotification(notification, idRefMap, history)
: renderSubsequentNotification(notification, idRefMap, history);
})}

@ -528,6 +528,7 @@ function getAllowedNotificationIds(state) {
2: true,
3: true,
4: getCurrentChainId(state) === BSC_CHAIN_ID,
5: true,
};
}

Loading…
Cancel
Save