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';
@@ -55,6 +55,19 @@
const getSIWENonceCallFailed = useSelector(
state => getSIWENonceLoadingStatusSelector(state) === 'error',
);
+
+ const { onClose } = props;
+ React.useEffect(() => {
+ if (getSIWENonceCallFailed) {
+ Alert.alert(
+ 'Unknown error',
+ 'Uhh... try again?',
+ [{ text: 'OK', onPress: onClose }],
+ { cancelable: false },
+ );
+ }
+ }, [getSIWENonceCallFailed, onClose]);
+
const siweAuthCallLoading = useSelector(
state => siweAuthLoadingStatusSelector(state) === 'loading',
);
@@ -97,7 +110,6 @@
snapToIndex?.(0);
}, [snapToIndex, snapPoints]);
- const { onClose } = props;
const callSIWE = React.useCallback(
async (message, signature, extraInfo) => {
try {
@@ -225,9 +237,7 @@
}
let activity;
- if (getSIWENonceCallFailed) {
- activity = Oops, try again later!;
- } else if (isLoading || siweAuthCallLoading) {
+ if (!getSIWENonceCallFailed && (isLoading || siweAuthCallLoading)) {
activity = ;
}