diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js --- a/native/account/siwe-panel.react.js +++ b/native/account/siwe-panel.react.js @@ -2,7 +2,7 @@ import BottomSheet from '@gorhom/bottom-sheet'; import * as React from 'react'; -import { ActivityIndicator, Text, View, Alert } from 'react-native'; +import { ActivityIndicator, View, Alert } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import WebView from 'react-native-webview'; @@ -224,10 +224,19 @@ ); } + React.useEffect(() => { + if (getSIWENonceCallFailed) { + Alert.alert( + 'Unknown error', + 'Uhh... try again?', + [{ text: 'OK', onPress: onClose }], + { cancelable: false }, + ); + } + }, [getSIWENonceCallFailed, onClose]); + let activity; - if (getSIWENonceCallFailed) { - activity = Oops, try again later!; - } else if (isLoading || siweAuthCallLoading) { + if (!getSIWENonceCallFailed && (isLoading || siweAuthCallLoading)) { activity = ; }