Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32556734
D14416.1767232926.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D14416.1767232926.diff
View Options
diff --git a/native/account/registration/missing-registration-data/missing-registration-data-handler.react.js b/native/account/registration/missing-registration-data/missing-registration-data-handler.react.js
--- a/native/account/registration/missing-registration-data/missing-registration-data-handler.react.js
+++ b/native/account/registration/missing-registration-data/missing-registration-data-handler.react.js
@@ -36,12 +36,17 @@
);
const dispatch = useDispatch();
+ const lastAlertInfo = React.useRef(createSIWEBAckupMessageAlertInfo);
+ React.useEffect(() => {
+ lastAlertInfo.current = createSIWEBAckupMessageAlertInfo;
+ }, [createSIWEBAckupMessageAlertInfo]);
+
React.useEffect(() => {
if (
!loggedIn ||
accountHasPassword(currentUserInfo) ||
cachedSelections.siweBackupSecrets ||
- shouldSkipCreateSIWEBackupMessageAlert(createSIWEBAckupMessageAlertInfo)
+ shouldSkipCreateSIWEBackupMessageAlert(lastAlertInfo.current)
) {
return;
}
@@ -55,7 +60,10 @@
const nativeSIWEBackupSecrets =
await commCoreModule.getSIWEBackupSecrets();
- if (nativeSIWEBackupSecrets) {
+ if (
+ nativeSIWEBackupSecrets ||
+ shouldSkipCreateSIWEBackupMessageAlert(lastAlertInfo.current)
+ ) {
return;
}
@@ -67,6 +75,7 @@
alertType: alertTypes.SIWE_BACKUP_MESSAGE,
time: Date.now(),
};
+ lastAlertInfo.current = payload;
dispatch({
type: recordAlertActionType,
@@ -76,7 +85,6 @@
}, [
cachedSelections.siweBackupSecrets,
checkIfPrimaryDevice,
- createSIWEBAckupMessageAlertInfo,
currentUserInfo,
dispatch,
loggedIn,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 1, 2:02 AM (6 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5874823
Default Alt Text
D14416.1767232926.diff (1 KB)
Attached To
Mode
D14416: [native] Avoid running the handler multiple times
Attached
Detach File
Event Timeline
Log In to Comment