Update ElectrumSettings.tsx

This commit is contained in:
Marcos Rodriguez Velez 2024-11-01 11:44:18 -04:00
parent ed27cc5c14
commit 3ab609e074

View File

@ -321,9 +321,14 @@ const ElectrumSettings: React.FC = () => {
const onElectrumConnectionEnabledSwitchChange = async (value: boolean) => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
triggerSelectionHapticFeedback();
await BlueElectrum.setDisabled(value);
setIsElectrumDisabled(value);
try {
triggerSelectionHapticFeedback();
await BlueElectrum.setDisabled(value);
setIsElectrumDisabled(value);
} catch (error) {
triggerHapticFeedback(HapticFeedbackTypes.NotificationError);
presentAlert({ message: (error as Error).message });
}
};
const renderElectrumSettings = () => {