From e722e43d958e420e534654f24cb4c9856d9931e9 Mon Sep 17 00:00:00 2001 From: marcospr Date: Mon, 22 Feb 2021 22:28:45 -0500 Subject: [PATCH] FIX: Only send complication updates if watch is reachable --- WatchConnectivity.ios.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/WatchConnectivity.ios.js b/WatchConnectivity.ios.js index 91e11c290..4937f1a23 100644 --- a/WatchConnectivity.ios.js +++ b/WatchConnectivity.ios.js @@ -28,7 +28,7 @@ function WatchConnectivity() { }, [walletsInitialized, wallets, preferredFiatCurrency, isReachable, isInstalled]); useEffect(() => { - if (walletsInitialized && preferredFiatCurrency) { + if (isInstalled && isReachable && walletsInitialized && preferredFiatCurrency) { try { transferCurrentComplicationUserInfo({ preferredFiatCurrency: JSON.parse(preferredFiatCurrency).endPointKey, @@ -38,8 +38,7 @@ function WatchConnectivity() { console.log(e); } } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [preferredFiatCurrency, walletsInitialized]); + }, [preferredFiatCurrency, walletsInitialized, isReachable, isInstalled]); const handleMessages = (message, reply) => { if (message.request === 'createInvoice') {