diff --git a/src/helpers/support.ts b/src/helpers/support.ts index 3fadd2166c0..fb2a3a758b8 100644 --- a/src/helpers/support.ts +++ b/src/helpers/support.ts @@ -4,6 +4,7 @@ import { debounce } from 'lodash'; import Mailer from 'react-native-mail'; import { Alert } from '../components/alerts'; import * as i18n from '@/languages'; +import { Linking } from 'react-native'; const SupportEmailAddress = 'support@rainbow.me'; @@ -33,23 +34,34 @@ const handleMailError = debounce( 250 ); +const openLearnMorePage = () => + Linking.openURL( + 'https://support.rainbow.me/en/articles/7975958-an-error-occurred' + ); + const messageSupport = () => Mailer.mail(supportEmailOptions, handleMailError); const supportEmailOptions = { recipients: [SupportEmailAddress], - subject: '🌈️ Rainbow Support', + subject: '🌈️ Rainbow Support: An Error Occurred', }; export default function showWalletErrorAlert() { Alert({ + cancelable: true, buttons: [ + { + onPress: openLearnMorePage, + text: i18n.t(i18n.l.support.wallet_alert.learn_more), + }, { onPress: messageSupport, - style: 'cancel', + isPreferred: true, text: i18n.t(i18n.l.support.wallet_alert.message_support), }, { text: i18n.t(i18n.l.support.wallet_alert.close), + style: 'destructive', }, ], message: i18n.t(i18n.l.support.wallet_alert.message), diff --git a/src/languages/en_US.json b/src/languages/en_US.json index 1a28782b82b..5446923ee39 100644 --- a/src/languages/en_US.json +++ b/src/languages/en_US.json @@ -2233,8 +2233,9 @@ "wallet_alert": { "message_support": "Message Support", "close": "Close", - "message": "For help, please reach out to support! \nWe'll get back to you soon!", - "title": "An error occured" + "learn_more": "Learn More", + "message": "If you've recently swapped phones, you may need to reimport your wallets. For all other help, please reach out to support! \n\nWe'll get back to you soon!", + "title": "An error occurred" } }, "walletconnect": {