mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +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:
parent
0c931a7c6d
commit
b7a1c8c302
@ -1288,6 +1288,10 @@
|
|||||||
"message": "Swap on Binance Smart Chain",
|
"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."
|
"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": {
|
"ofTextNofM": {
|
||||||
"message": "of"
|
"message": "of"
|
||||||
},
|
},
|
||||||
|
@ -22,6 +22,10 @@ export const UI_NOTIFICATIONS = {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
5: {
|
||||||
|
id: 5,
|
||||||
|
date: '2021-05-18',
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getTranslatedUINoficiations = (t, locale) => {
|
export const getTranslatedUINoficiations = (t, locale) => {
|
||||||
@ -53,5 +57,14 @@ export const getTranslatedUINoficiations = (t, locale) => {
|
|||||||
new Date(UI_NOTIFICATIONS[4].date),
|
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": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,10 @@
|
|||||||
"1": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,10 @@
|
|||||||
"1": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,10 +96,10 @@
|
|||||||
"1": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,10 @@
|
|||||||
"1": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,10 +41,10 @@
|
|||||||
"1": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,10 @@
|
|||||||
"1": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,10 +42,10 @@
|
|||||||
"1": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,10 +52,10 @@
|
|||||||
"1": {
|
"1": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"2": {
|
"3": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
},
|
},
|
||||||
"3": {
|
"5": {
|
||||||
"isShown": true
|
"isShown": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,12 @@ function getActionFunctionById(id, history) {
|
|||||||
updateViewedNotifications({ 4: true });
|
updateViewedNotifications({ 4: true });
|
||||||
history.push(BUILD_QUOTE_ROUTE);
|
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];
|
return actionFunctions[id];
|
||||||
@ -174,7 +180,8 @@ export default function WhatsNewPopup({ onClose }) {
|
|||||||
<div className="whats-new-popup__notifications">
|
<div className="whats-new-popup__notifications">
|
||||||
{notifications.map(({ id }, index) => {
|
{notifications.map(({ id }, index) => {
|
||||||
const notification = getTranslatedUINoficiations(t, locale)[id];
|
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)
|
? renderFirstNotification(notification, idRefMap, history)
|
||||||
: renderSubsequentNotification(notification, idRefMap, history);
|
: renderSubsequentNotification(notification, idRefMap, history);
|
||||||
})}
|
})}
|
||||||
|
@ -528,6 +528,7 @@ function getAllowedNotificationIds(state) {
|
|||||||
2: true,
|
2: true,
|
||||||
3: true,
|
3: true,
|
||||||
4: getCurrentChainId(state) === BSC_CHAIN_ID,
|
4: getCurrentChainId(state) === BSC_CHAIN_ID,
|
||||||
|
5: true,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user