Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: PPOM - What's New copy text refers to OpenSea previous feature - non existing in Mobile #7797

Merged
merged 5 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 33 additions & 22 deletions app/components/UI/WhatsNewModal/WhatsNewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ import React, { useCallback, useRef, useState } from 'react';
import {
StyleSheet,
View,
Text,
TouchableOpacity,
Image,
TouchableWithoutFeedback,
NativeSyntheticEvent,
NativeScrollEvent,
Platform,
} from 'react-native';
import { fontStyles } from '../../../styles/common';
import Icon from 'react-native-vector-icons/FontAwesome';
import { strings } from '../../../../locales/i18n';
import Device from '../../../util/device';
import AsyncStorage from '../../../store/async-storage-wrapper';
Expand All @@ -21,6 +18,15 @@ import {
} from '../../../constants/storage';
import StyledButton from '../StyledButton';
import { useTheme } from '../../../util/theme';
import Text, {
TextColor,
TextVariant,
} from '../../../component-library/components/Texts/Text';
import Icon, {
IconColor,
IconName,
IconSize,
} from '../../../component-library/components/Icons/Icon';
import ReusableModal, { ReusableModalRef } from '../ReusableModal';
import { whatsNewList } from './';
import { Colors } from '../../../util/theme/models';
Expand Down Expand Up @@ -77,18 +83,10 @@ const createStyles = (colors: Colors) =>
marginBottom: 20,
paddingHorizontal: modalPadding,
},
headerCenterAux: {
flex: 1,
},
headerClose: {
flex: 1,
alignItems: 'flex-end',
},
headerText: {
...fontStyles.bold,
fontSize: 18,
color: colors.text.default,
},
slideImageContainer: {
flexDirection: 'row',
borderRadius: 10,
Expand All @@ -101,16 +99,10 @@ const createStyles = (colors: Colors) =>
height: slideImageHeight,
},
slideTitle: {
...fontStyles.bold,
fontSize: 16,
marginBottom: 12,
color: colors.text.default,
},
slideDescription: {
...fontStyles.normal,
fontSize: 14,
lineHeight: 20,
color: colors.text.default,
marginBottom: 24,
},
screen: { justifyContent: 'center', alignItems: 'center' },
Expand Down Expand Up @@ -151,10 +143,24 @@ const WhatsNewModal = () => {
const renderSlideElement = (elementInfo: any) => {
switch (elementInfo.type) {
case 'title':
return <Text style={styles.slideTitle}>{elementInfo.title}</Text>;
return (
<Text
color={TextColor.Default}
variant={TextVariant.BodyLGMedium}
style={styles.slideTitle}
>
{elementInfo.title}
</Text>
);
case 'description':
return (
<Text style={styles.slideDescription}>{elementInfo.description}</Text>
<Text
color={TextColor.Default}
variant={TextVariant.HeadingSMRegular}
style={styles.slideDescription}
>
{elementInfo.description}
</Text>
);
case 'image':
return (
Expand Down Expand Up @@ -208,15 +214,20 @@ const WhatsNewModal = () => {

const renderHeader = () => (
<View style={styles.header}>
<View style={styles.headerCenterAux} />
<Text style={styles.headerText}>{strings('whats_new.title')}</Text>
<Text color={TextColor.Default} variant={TextVariant.HeadingMD}>
{strings('whats_new.title')}
</Text>
<View style={styles.headerClose}>
<TouchableOpacity
onPress={() => dismissModal()}
hitSlop={{ top: 10, left: 10, bottom: 10, right: 10 }}
{...generateTestId(Platform, WhatsNewModalSelectorsIDs.CLOSE_BUTTON)}
>
<Icon name="times" size={16} color={colors.icon.default} />
<Icon
name={IconName.Close}
size={IconSize.Md}
color={IconColor.Default}
/>
</TouchableOpacity>
</View>
</View>
Expand Down
12 changes: 4 additions & 8 deletions app/components/UI/WhatsNewModal/whatsNewList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,21 @@ export const whatsNew: WhatsNew = {
slides: isBlockaidFeatureEnabled()
? [
[
{
type: 'image',
image: require('../../../images/whats_new_blockaid.png'),
},
{
type: 'title',
title: strings('whats_new.blockaid.title'),
},
{
type: 'description',
description: strings('whats_new.blockaid.description_1'),
type: 'image',
image: require('../../../images/whats_new_blockaid.png'),
},
{
type: 'description',
description: strings('whats_new.blockaid.description_2'),
description: strings('whats_new.blockaid.description_1'),
},
{
type: 'description',
description: strings('whats_new.blockaid.description_3'),
description: strings('whats_new.blockaid.description_2'),
},
{
type: 'button',
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "OK"
},
"whats_new": {
"title": "Neuigkeiten anzeigen",
"blockaid": {
"title": "Gehen Sie mit Sicherheitsbenachrichtigungen auf Nummer sicher.",
"description_1": "Fallen Sie nicht bekannten Betrügereien zum Opfer und schützen Sie gleichzeitig Ihre Privatsphäre mit Sicherheitsbenachrichtigungen von Blockaid.",
"description_2": "Gehen Sie immer mit Sorgfalt vor, bevor Sie Anfragen genehmigen.",
"description_3": "Wir haben für Sie diese Funktion aktiviert, wenn Sie die Sicherheitsbenachrichtigungen von OpenSea erhalten haben.",
"action_text": "Sicherheitsbenachrichtigungen aktivieren"
}
},
Expand Down
2 changes: 0 additions & 2 deletions locales/languages/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -2199,9 +2199,7 @@
"title": "Δείτε τι νέο υπάρχει",
"blockaid": {
"title": "Μείνετε ασφαλείς με ειδοποιήσεις ασφαλείας",
"description_1": "Αποφύγετε τις γνωστές απάτες, διατηρώντας παράλληλα το απόρρητό σας με τις ειδοποιήσεις ασφαλείας της Blockaid.",
"description_2": "Πάντα να προβαίνετε σε δικό σας επιμελή έλεγχο προτού εγκρίνετε τα αιτήματα.",
"description_3": "Εάν ενεργοποιήσατε τις ειδοποιήσεις ασφαλείας από το OpenSea, σας μεταφέρουμε σε αυτή τη λειτουργία.",
"action_text": "Ενεργοποίηση ειδοποιήσεων ασφαλείας"
}
},
Expand Down
5 changes: 2 additions & 3 deletions locales/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2207,12 +2207,11 @@
"ok": "OK"
},
"whats_new": {
"title": "See what's new",
"title": "What's new",
"blockaid": {
"title": "Stay safe with security alerts",
"description_1": "Steer clear of known scams while still preserving your privacy with security alerts powered by Blockaid.",
"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.",
"description_3": "If you enabled security alerts from OpenSea, we've moved you over to this feature.",
"action_text": "Enable security alerts"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "Aceptar"
},
"whats_new": {
"title": "Ver las novedades",
"blockaid": {
"title": "Manténgase seguro con alertas de seguridad",
"description_1": "Aléjese de las estafas conocidas mientras conserva su privacidad con las alertas de seguridad impulsadas por Blockaid.",
"description_2": "Siempre asegúrese de hacer su propia diligencia debida antes de aprobar cualquier solicitud.",
"description_3": "Si habilitó las alertas de seguridad de OpenSea, lo trasladamos a esta función.",
"action_text": "Habilitar alertas de seguridad"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "OK"
},
"whats_new": {
"title": "Voir les nouveautés",
"blockaid": {
"title": "Restez en sécurité grâce aux alertes de sécurité",
"description_1": "Évitez de vous faire arnaquer et protégez vos données personnelles grâce aux alertes de sécurité fournies par Blockaid.",
"description_2": "Vous devez faire preuve de diligence raisonnable avant d’approuver toute demande.",
"description_3": "Les utilisateurs qui ont déjà activé les alertes de sécurité OpenSea recevront désormais des alertes de sécurité de ce nouveau fournisseur.",
"action_text": "Activer les alertes de sécurité"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/hi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "ठीक है"
},
"whats_new": {
"title": "देखे क्या नया है",
"blockaid": {
"title": "सुरक्षा चेतावनियों के माध्यम से सुरक्षित रहें",
"description_1": "Blockaid द्वारा पावर्ड सुरक्षा चेतावनी के माध्यम से अपनी गोपनीयता बनाए रखते हुए जाने-पहचाने घोटालों से बचें।",
"description_2": "किसी भी रिक्वेस्ट को मंजूरी देने से पहले हमेशा पूरी जांच-पड़ताल ज़रूर करें।",
"description_3": "अगर आपने OpenSea से सुरक्षा चेतावनी को इनेबल किया हुआ है, तो हम आपको यह सुविधा उपलब्ध करा चुके हैं।",
"action_text": "सुरक्षा चेतावनियों को इनेबल करें"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "Oke"
},
"whats_new": {
"title": "Lihat yang baru",
"blockaid": {
"title": "Tetap aman bersama peringatan keamanan",
"description_1": "Hindari penipuan yang terdeteksi sambil tetap menjaga privasi Anda dengan peringatan keamanan yang didukung oleh Blockaid.",
"description_2": "Selalu lakukan uji tuntas sendiri sebelum menyetujui permintaan.",
"description_3": "Jika Anda mengaktifkan peringatan keamanan dari OpenSea, kami telah memindahkan Anda ke fitur ini.",
"action_text": "Aktifkan peringatan keamanan"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "OK"
},
"whats_new": {
"title": "新機能をご覧ください",
"blockaid": {
"title": "セキュリティアラートで安全を確保",
"description_1": "Blockaidによるセキュリティアラートを使用して、プライバシーを守りつつ既知の詐欺を回避しましょう。",
"description_2": "要求を承認する前に、必ず独自のデューデリジェンスを行ってください。",
"description_3": "OpenSeaのセキュリティアラートを有効にしていた場合、この機能に移行されました。",
"action_text": "セキュリティアラートを有効にする"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "확인"
},
"whats_new": {
"title": "새롭게 바뀐 사항을 확인하세요",
"blockaid": {
"title": "보안 경고로 안전성을 유지하세요",
"description_1": "Blockaid가 제공하는 보안 경고를 통해 개인정보를 보호하면서 알려진 사기를 피하세요.",
"description_2": "요청을 승인하기 전에 항상 직접 확인하세요.",
"description_3": "OpenSea에서 보안 경고를 활성화하면, 이 기능으로 이동합니다.",
"action_text": "보안 경고 활성화"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "OK"
},
"whats_new": {
"title": "Veja as novidades",
"blockaid": {
"title": "Fique protegido com os alertas de segurança",
"description_1": "Fique longe de golpes conhecidos enquanto preserva sua privacidade com alertas de segurança com tecnologia da Blockaid.",
"description_2": "Sempre faça sua própria devida diligência antes de aprovar solicitações.",
"description_3": "Se você ativou os alertas de segurança da OpenSea, fizemos sua transição para esse recurso.",
"action_text": "Ativar alertas de segurança"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "ОК"
},
"whats_new": {
"title": "Посмотрите, что нового",
"blockaid": {
"title": "Избегайте угроз с помощью оповещений безопасности",
"description_1": "Избегайте известных мошенников, сохраняя при этом свою конфиденциальность с помощью оповещений безопасности Blockaid.",
"description_2": "Всегда проводите собственную комплексную проверку перед утверждением запросов.",
"description_3": "Если вы включили оповещения безопасности от OpenSea, мы активировали для вас эту функцию.",
"action_text": "Включить оповещения безопасности"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/tl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "OK"
},
"whats_new": {
"title": "Tingnan kung ano'ng bago",
"blockaid": {
"title": "Manatiling ligtas gamit ang mga alerto sa seguridad",
"description_1": "Iwasan ang mga kilalang panloloko habang pinapanatili pa rin ang iyong pagkapribado gamit ang mga alerto sa seguridad na pinatatakbo ng Blockaid.",
"description_2": "Palaging gumawa ng sarili mong pagsusuri bago aprubahan ang mga kahilingan.",
"description_3": "Kung pinagana mo ang mga alerto sa seguridad mula sa OpenSea, inilipat ka namin sa feature na ito.",
"action_text": "Paganahin ang mga alerto sa seguridad"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "Tamam"
},
"whats_new": {
"title": "Yeniliklere bakın",
"blockaid": {
"title": "Güvenlik uyarıları ile güvende kalın",
"description_1": "Blockaid tarafından desteklenen güvenlik uyarıları ile gizliliğinizi korumaya devam ederken bilinen dolandırıcılıklardan uzak durun.",
"description_2": "Talepleri onaylamadan önce kendiniz her zaman gerekli özeni gösterin.",
"description_3": "OpenSea'den güvenlik uyarılarını etkinleştirdiyseniz sizi bu özelliğe taşıdık.",
"action_text": "Güvenlik uyarılarını etkinleştir"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "OK"
},
"whats_new": {
"title": "Xem thông tin mới",
"blockaid": {
"title": "Đảm bảo an toàn với cảnh báo bảo mật",
"description_1": "Tránh xa các hành vi gian lận đã biết trong khi vẫn bảo vệ quyền riêng tư của bạn với các cảnh báo bảo mật do Blockaid cung cấp.",
"description_2": "Luôn tự thẩm định trước khi chấp thuận các yêu cầu.",
"description_3": "Nếu bạn đã bật cảnh báo bảo mật từ OpenSea, chúng tôi đã chuyển bạn sang tính năng này.",
"action_text": "Bật cảnh báo bảo mật"
}
},
Expand Down
3 changes: 0 additions & 3 deletions locales/languages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -2196,12 +2196,9 @@
"ok": "确定"
},
"whats_new": {
"title": "了解新功能",
"blockaid": {
"title": "安全警报助您确保安全",
"description_1": "Blockaid提供的安全警报可以幫助您避开已知的欺诈,同时仍能保护自己的隐私。",
"description_2": "在批准请求之前,必须自行作出审慎调查。",
"description_3": "如果您启用了OpenSea的安全警报,则我们已为您转到此功能。",
"action_text": "启用安全警报"
}
},
Expand Down
Loading