From da48b93929a33f770c287de0250b3ca039484ff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Rodriguez=20V=C3=A9lez?= Date: Tue, 15 Oct 2024 23:57:28 -0400 Subject: [PATCH] Update screen/settings/ElectrumSettings.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- screen/settings/ElectrumSettings.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/screen/settings/ElectrumSettings.tsx b/screen/settings/ElectrumSettings.tsx index 942cd8433..9ed45d305 100644 --- a/screen/settings/ElectrumSettings.tsx +++ b/screen/settings/ElectrumSettings.tsx @@ -278,9 +278,14 @@ const ElectrumSettings: React.FC = () => { const checkServer = async () => { setIsLoading(true); - const features = await BlueElectrum.serverFeatures(); - triggerHapticFeedback(HapticFeedbackTypes.NotificationWarning); - presentAlert({ message: JSON.stringify(features, null, 2) }); + try { + const features = await BlueElectrum.serverFeatures(); + triggerHapticFeedback(HapticFeedbackTypes.NotificationWarning); + presentAlert({ message: JSON.stringify(features, null, 2) }); + } catch (error) { + triggerHapticFeedback(HapticFeedbackTypes.NotificationError); + presentAlert({ message: loc.settings.electrum_server_error }); + } setIsLoading(false); };