1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 23:58:06 +01:00
metamask-extension/shared/notifications/institutional/index.js
Albert Olivé 1e56fdbf66
[MMI] Added code fences in whats new popup (#19581)
* added code fences in whats new popup

* Improved code

* Added missing prop

* Update LavaMoat policies

* updated functions by using an options object for the rendering functions in order to bypass possible typsecript issues

---------

Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
2023-06-27 08:30:42 +02:00

36 lines
881 B
JavaScript

export const UI_INSTITUTIONAL_NOTIFICATIONS = {
1: {
id: 11,
date: '2022-08-28',
image: {
src: 'images/portfolio.svg',
},
hideDate: true,
descriptionInBullets: true,
},
};
export const getTranslatedInstitutionalUINotifications = (t, locale) => {
const formattedLocale = locale.replace('_', '-');
return {
1: {
...UI_INSTITUTIONAL_NOTIFICATIONS[11],
title: 'Portfolio dashboard',
description: [
'Portfolio snapshots',
'Filtering by account and network',
'Sector and protocol allocation',
'Improved navigation',
],
date: new Intl.DateTimeFormat(formattedLocale).format(
new Date(UI_INSTITUTIONAL_NOTIFICATIONS[11].date),
),
customButton: {
name: 'mmi-portfolio',
text: t('viewPortfolioDashboard'),
logo: true,
},
},
};
};