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

Update copy for an Error Occurred message for Support #5187

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading