Skip to content

Commit

Permalink
Merge pull request zingolabs#760 from juanky201271/dev_email_report_e…
Browse files Browse the repository at this point in the history
…rror_improvement

Error when the App try to send a report email improved
  • Loading branch information
juanky201271 authored Dec 6, 2024
2 parents b350cbf + 6061712 commit 9a503bd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion app/sendEmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export const sendEmail = async (
})
.catch((err: any) => {
console.log('Error opening email client:', err);
Alert.alert(translate('loadedapp.email-error') as string, JSON.stringify(err));
Alert.alert(
translate('loadedapp.email-error-title') as string,
translate('loadedapp.email-error-body') as string,
);
});
};
3 changes: 2 additions & 1 deletion app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"valuetransfer-confirmed": "Transaction confirmed\n",
"payment-made": "Payment made\n",
"valuetransfer-reverted": "The transaction was never confirmed by a validator.",
"email-error": "Error opening email client"
"email-error-title": "Error opening email client",
"email-error-body": "Go to your device's Settings and set a default email application to send the report."
},
"rpc": {
"parsebirthday-error": "Error: Couldn't parse as a number:",
Expand Down
3 changes: 2 additions & 1 deletion app/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"valuetransfer-confirmed": "Transacción confirmada\n",
"payment-made": "Pago realizado\n",
"valuetransfer-reverted": "La transacción nunca fue confirmada por un validador.",
"email-error": "Error al abrir el cliente de correo electrónico"
"email-error-title": "Error al abrir el cliente de correo electrónico",
"email-error-body": "Ingresa a los Ajustes de tu dispositivo y configura una aplicación de correo predeterminada para enviar el reporte."
},
"rpc": {
"parsebirthday-error": "Error: No es posible convertirlo en un número:",
Expand Down
3 changes: 2 additions & 1 deletion app/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"valuetransfer-confirmed": "Transação confirmada\n",
"payment-made": "Pagamento efetuado\n",
"valuetransfer-reverted": "A transação nunca foi confirmada por um validador.",
"email-error": "Erro ao abrir o cliente de e-mail"
"email-error-title": "Erro ao abrir o cliente de e-mail",
"email-error-body": "Acesse as configurações do seu dispositivo e defina um aplicativo de e-mail padrão para enviar o relatório."
},
"rpc": {
"parsebirthday-error": "Erro: Não foi possível analisar como um número:",
Expand Down
3 changes: 2 additions & 1 deletion app/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"valuetransfer-confirmed": "Транзакция подтверждена\n",
"payment-made": "Платеж произведен\n",
"valuetransfer-reverted": "Транзакция так и не была подтверждена валидатором.",
"email-error": "Ошибка открытия почтового клиента"
"email-error-title": "Ошибка открытия почтового клиента",
"email-error-body": "Перейдите в настройки вашего устройства и установите почтовое приложение по умолчанию для отправки отчета."
},
"rpc": {
"parsebirthday-error": "Ошибка: Невозможно распознать как число:",
Expand Down

0 comments on commit 9a503bd

Please sign in to comment.