1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

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
This commit is contained in:
ryanml 2021-05-18 15:00:34 -07:00 committed by GitHub
parent 0c931a7c6d
commit b7a1c8c302
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 44 additions and 19 deletions

View File

@ -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"
},

View File

@ -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),
),
},
};
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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);
})}

View File

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