Skip to content

Commit

Permalink
Update copy for an Error Occurred message for Support (#5187)
Browse files Browse the repository at this point in the history
* change email subject and add a learn more button on the alert dialog

* update copy
  • Loading branch information
walmat committed Nov 14, 2023
1 parent c53aaee commit dbbdaf0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
16 changes: 14 additions & 2 deletions src/helpers/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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),
Expand Down
5 changes: 3 additions & 2 deletions src/languages/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit dbbdaf0

Please sign in to comment.