Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32435389
D14778.1765357785.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D14778.1765357785.diff
View Options
diff --git a/native/account/restore-backup-screen.react.js b/native/account/restore-backup-screen.react.js
--- a/native/account/restore-backup-screen.react.js
+++ b/native/account/restore-backup-screen.react.js
@@ -18,6 +18,7 @@
import { useColors, useStyles } from '../themes/colors.js';
import {
appOutOfDateAlertDetails,
+ networkErrorAlertDetails,
unknownErrorAlertDetails,
userNotFoundAlertDetails,
} from '../utils/alert-messages.js';
@@ -90,6 +91,8 @@
messageForException === 'use_new_flow'
) {
alertDetails = appOutOfDateAlertDetails;
+ } else if (messageForException === 'network_error') {
+ alertDetails = networkErrorAlertDetails;
} else if (messageForException === 'use_v1_flow') {
try {
await performV1Login(userIdentifier, credentials);
diff --git a/native/account/restore-password-account-screen.react.js b/native/account/restore-password-account-screen.react.js
--- a/native/account/restore-password-account-screen.react.js
+++ b/native/account/restore-password-account-screen.react.js
@@ -21,6 +21,7 @@
import { useStyles } from '../themes/colors.js';
import {
appOutOfDateAlertDetails,
+ networkErrorAlertDetails,
unknownErrorAlertDetails,
userNotFoundAlertDetails,
} from '../utils/alert-messages.js';
@@ -127,6 +128,8 @@
messageForException === 'use_new_flow'
) {
alertMessage = appOutOfDateAlertDetails;
+ } else if (messageForException === 'network_error') {
+ alertMessage = networkErrorAlertDetails;
}
Alert.alert(
alertMessage.title,
diff --git a/native/account/restore-prompt-screen.react.js b/native/account/restore-prompt-screen.react.js
--- a/native/account/restore-prompt-screen.react.js
+++ b/native/account/restore-prompt-screen.react.js
@@ -24,6 +24,7 @@
import { useColors, useStyles } from '../themes/colors.js';
import {
appOutOfDateAlertDetails,
+ networkErrorAlertDetails,
unknownErrorAlertDetails,
} from '../utils/alert-messages.js';
import Alert from '../utils/alert.js';
@@ -98,6 +99,8 @@
title: 'Login attempt timed out',
message: 'Please try again',
};
+ } else if (messageForException === 'network_error') {
+ alertDetails = networkErrorAlertDetails;
}
Alert.alert(
alertDetails.title,
diff --git a/native/utils/alert-messages.js b/native/utils/alert-messages.js
--- a/native/utils/alert-messages.js
+++ b/native/utils/alert-messages.js
@@ -41,6 +41,12 @@
message: 'Uhh... try again?',
};
+const networkErrorAlertDetails: AlertDetails = {
+ title: 'Network error',
+ message:
+ 'Failed to contact Comm services. Please check your network connection.',
+};
+
const getFarcasterAccountAlreadyLinkedAlertDetails = (
commUsername: ?string,
): AlertDetails => ({
@@ -56,5 +62,6 @@
usernameTakenAlertDetails,
userNotFoundAlertDetails,
unknownErrorAlertDetails,
+ networkErrorAlertDetails,
getFarcasterAccountAlreadyLinkedAlertDetails,
};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 10, 9:09 AM (15 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5862754
Default Alt Text
D14778.1765357785.diff (2 KB)
Attached To
Mode
D14778: [native] Display network error alert during restore flow
Attached
Detach File
Event Timeline
Log In to Comment