Skip to content

Commit

Permalink
feat(ramp): sell what's new modal content (#7864)
Browse files Browse the repository at this point in the history
  • Loading branch information
wachunei authored Nov 20, 2023
1 parent da3d7fc commit 4e01d6e
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 33 deletions.
89 changes: 56 additions & 33 deletions app/components/UI/WhatsNewModal/whatsNewList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,67 @@ import { WhatsNew } from './types';
export const whatsNew: WhatsNew = {
// All users that have <6.4.0 and are updating to >=6.4.0 should see
onlyUpdates: false, // false: Users who updated the app and new installs will see this. true: only users who update will see it
maxLastAppVersion: '7.3.0', // Only users who had a previous version <7.3.0 version will see this
minAppVersion: '7.3.0', // Only users who updated to a version >= 7.3.0 will see this
maxLastAppVersion: '7.12.0', // Only users who had a previous version <7.12.0 version will see this
minAppVersion: '7.12.0', // Only users who updated to a version >= 7.3.0 will see this
/**
* Slides utilizes a templating system in the form of a 2D array, which is eventually rendered within app/components/UI/WhatsNewModal/index.js.
* The root layer determines the number of slides. Ex. To display 3 slides, the root layer should contain 3 arrays.
* The inner layer determines the content that will be rendered within each slide.
* The slide content takes the form of union types, where the possible types are `image`, `title`, `description`, or `button`.
* Both slide count and slide content will be rendered in the same order as the data set.
*/
slides: isBlockaidFeatureEnabled()
? [
[
{
type: 'title',
title: strings('whats_new.blockaid.title'),
},
{
type: 'image',
image: require('../../../images/whats_new_blockaid.png'),
},
{
type: 'description',
description: strings('whats_new.blockaid.description_1'),
},
{
type: 'description',
description: strings('whats_new.blockaid.description_2'),
},
{
type: 'button',
buttonText: strings('whats_new.blockaid.action_text'),
buttonType: 'blue',
onPress: (props) =>
props.navigation.navigate(Routes.SETTINGS_VIEW, {
screen: Routes.SETTINGS.EXPERIMENTAL_SETTINGS,
}),
},
],
]
: [],
slides: [
[
{
type: 'image',
image: require('../../../images/whats_new_sell.png'),
},
{
type: 'title',
title: strings('whats_new.sell.title'),
},
{
type: 'description',
description: strings('whats_new.sell.description'),
},
// button to try it out
{
type: 'button',
buttonText: strings('whats_new.sell.action_text'),
buttonType: 'blue',
onPress: (props) => props.navigation.navigate(Routes.RAMP.SELL),
},
],
...(isBlockaidFeatureEnabled()
? ([
[
{
type: 'title',
title: strings('whats_new.blockaid.title'),
},
{
type: 'image',
image: require('../../../images/whats_new_blockaid.png'),
},
{
type: 'description',
description: strings('whats_new.blockaid.description_1'),
},
{
type: 'description',
description: strings('whats_new.blockaid.description_2'),
},
{
type: 'button',
buttonText: strings('whats_new.blockaid.action_text'),
buttonType: 'blue',
onPress: (props) =>
props.navigation.navigate(Routes.SETTINGS_VIEW, {
screen: Routes.SETTINGS.EXPERIMENTAL_SETTINGS,
}),
},
],
] as WhatsNew['slides'])
: []),
],
};
Binary file added app/images/whats_new_sell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/whats_new_sell@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/whats_new_sell@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions locales/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2278,6 +2278,11 @@
"description_1": "Steer clear of known scams while still preserving your privacy with security alerts powered by Blockaid on Ethereum Mainnet.",
"description_2": "Always do your own due diligence before approving requests.",
"action_text": "Enable security alerts"
},
"sell": {
"title": "Cashing out made easy",
"description": "Sell your crypto directly in MetaMask! We’ll help you find quotes from trusted providers, so you can sell your crypto in an accessible, fast, and secure way, every time.",
"action_text": "Try it out"
}
},
"invalid_network": {
Expand Down

0 comments on commit 4e01d6e

Please sign in to comment.