Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3382753
D12082.id40325.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D12082.id40325.diff
View Options
diff --git a/native/account/fullscreen-siwe-panel.react.js b/native/account/fullscreen-siwe-panel.react.js
--- a/native/account/fullscreen-siwe-panel.react.js
+++ b/native/account/fullscreen-siwe-panel.react.js
@@ -22,7 +22,10 @@
AccountDoesNotExistRouteName,
RegistrationRouteName,
} from '../navigation/route-names.js';
-import { unknownErrorAlertDetails } from '../utils/alert-messages.js';
+import {
+ unknownErrorAlertDetails,
+ appOutOfDateAlertDetails,
+} from '../utils/alert-messages.js';
import Alert from '../utils/alert.js';
type Props = {
@@ -104,6 +107,16 @@
const messageForException = getMessageForException(e);
if (messageForException === 'nonce expired') {
onNonceExpired('login');
+ } else if (
+ messageForException === 'Unsupported version' ||
+ messageForException === 'client_version_unsupported'
+ ) {
+ Alert.alert(
+ appOutOfDateAlertDetails.title,
+ appOutOfDateAlertDetails.message,
+ [{ text: 'OK', onPress: goBackToPrompt }],
+ { cancelable: false },
+ );
} else {
throw e;
}
@@ -148,14 +161,24 @@
e.message === 'account_does_not_exist'
) {
await onAccountDoesNotExist(result);
- return;
+ } else if (
+ e instanceof ServerError &&
+ e.message === 'client_version_unsupported'
+ ) {
+ Alert.alert(
+ appOutOfDateAlertDetails.title,
+ appOutOfDateAlertDetails.message,
+ [{ text: 'OK', onPress: goBackToPrompt }],
+ { cancelable: false },
+ );
+ } else {
+ Alert.alert(
+ unknownErrorAlertDetails.title,
+ unknownErrorAlertDetails.message,
+ [{ text: 'OK', onPress: goBackToPrompt }],
+ { cancelable: false },
+ );
}
- Alert.alert(
- unknownErrorAlertDetails.title,
- unknownErrorAlertDetails.message,
- [{ text: 'OK', onPress: goBackToPrompt }],
- { cancelable: false },
- );
return;
}
dispatch({
diff --git a/native/account/log-in-panel.react.js b/native/account/log-in-panel.react.js
--- a/native/account/log-in-panel.react.js
+++ b/native/account/log-in-panel.react.js
@@ -348,7 +348,10 @@
[{ text: 'OK', onPress: this.onUnsuccessfulLoginAlertAckowledged }],
{ cancelable: false },
);
- } else if (messageForException === 'Unsupported version') {
+ } else if (
+ messageForException === 'Unsupported version' ||
+ messageForException === 'client_version_unsupported'
+ ) {
Alert.alert(
appOutOfDateAlertDetails.title,
appOutOfDateAlertDetails.message,
diff --git a/native/account/registration/existing-ethereum-account.react.js b/native/account/registration/existing-ethereum-account.react.js
--- a/native/account/registration/existing-ethereum-account.react.js
+++ b/native/account/registration/existing-ethereum-account.react.js
@@ -29,7 +29,10 @@
ScreenParamList,
} from '../../navigation/route-names.js';
import { useStyles } from '../../themes/colors.js';
-import { unknownErrorAlertDetails } from '../../utils/alert-messages.js';
+import {
+ unknownErrorAlertDetails,
+ appOutOfDateAlertDetails,
+} from '../../utils/alert-messages.js';
import Alert from '../../utils/alert.js';
import { useLegacySIWEServerCall } from '../siwe-hooks.js';
@@ -92,6 +95,16 @@
cancelable: false,
},
);
+ } else if (
+ messageForException === 'Unsupported version' ||
+ messageForException === 'client_version_unsupported'
+ ) {
+ Alert.alert(
+ appOutOfDateAlertDetails.title,
+ appOutOfDateAlertDetails.message,
+ [{ text: 'OK', onPress: goBackToHome }],
+ { cancelable: false },
+ );
} else {
Alert.alert(
unknownErrorAlertDetails.title,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 11:51 AM (21 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596560
Default Alt Text
D12082.id40325.diff (4 KB)
Attached To
Mode
D12082: [native] Show alert when login fails due to outdated client version
Attached
Detach File
Event Timeline
Log In to Comment