1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 03:12:42 +02:00

Add what's new notification for transaction insights (#13000)

* Add what's new notification for transaction insights

* locales file lint fix
This commit is contained in:
Dan J Miller 2021-12-08 10:47:01 -03:30 committed by GitHub
parent c17fa40114
commit 5e9ea9d8fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 30 additions and 0 deletions

View File

@ -1976,6 +1976,15 @@
"message": "Ledger connection improvement",
"description": "Title for a notification in the 'See What's New' popup. Notifies ledger users that there is an improvement in how they can connect their device."
},
"notifications9DescriptionOne": {
"message": "We now provide you with more insights on the 'Data' tab when confirming smart contract transactions."
},
"notifications9DescriptionTwo": {
"message": "You can now get a better understanding of your transactions details before confirming, and more easily add transaction addresses to your address book, helping you make safe and informed decisions."
},
"notifications9Title": {
"message": "👓 We are making transactions easier to read."
},
"ofTextNofM": {
"message": "of"
},

BIN
app/images/txinsights.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -38,6 +38,14 @@ export const UI_NOTIFICATIONS = {
id: 8,
date: '2021-11-01',
},
9: {
id: 9,
date: '2021-12-07',
image: {
src: 'images/txinsights.png',
width: '80%',
},
},
};
export const getTranslatedUINoficiations = (t, locale) => {
@ -113,5 +121,17 @@ export const getTranslatedUINoficiations = (t, locale) => {
),
actionText: t('notifications8ActionText'),
},
9: {
...UI_NOTIFICATIONS[9],
title: t('notifications9Title'),
description: [
t('notifications9DescriptionOne'),
t('notifications9DescriptionTwo'),
],
date: new Intl.DateTimeFormat(formattedLocale).format(
new Date(UI_NOTIFICATIONS[9].date),
),
actionText: t('notifications9ActionText'),
},
};
};

View File

@ -647,6 +647,7 @@ function getAllowedNotificationIds(state) {
6: false,
7: false,
8: supportsWebHid && currentKeyringIsLedger && currentlyUsingLedgerLive,
9: getIsMainnet(state),
};
}