Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33281868
D14567.1768690435.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
D14567.1768690435.diff
View Options
diff --git a/native/account/restore.js b/native/account/restore.js
--- a/native/account/restore.js
+++ b/native/account/restore.js
@@ -15,6 +15,7 @@
usePasswordLogIn,
useWalletLogIn,
} from 'lib/hooks/login-hooks.js';
+import { useGetAndUpdateDeviceListsForUsers } from 'lib/hooks/peer-list-hooks.js';
import { IdentityClientContext } from 'lib/shared/identity-client-context.js';
import {
type IdentityAuthResult,
@@ -158,6 +159,7 @@
) => Promise<IdentityAuthResult> {
const restoreProtocol = useRestoreProtocol();
const dispatchActionPromise = useDispatchActionPromise();
+ const getAndUpdateDeviceListsForUsers = useGetAndUpdateDeviceListsForUsers();
const restoreAuth = React.useCallback(
async (
userIdentifier: string,
@@ -221,9 +223,17 @@
restoreAuth(userIdentifier, secret, siweSocialProof),
);
await restoreUserData(identityAuthResult);
+ void (async () => {
+ try {
+ const { userID } = identityAuthResult;
+ await getAndUpdateDeviceListsForUsers([userID]);
+ } catch (err) {
+ console.log(`Failed to sync own device list after restore: ${err}`);
+ }
+ })();
return identityAuthResult;
},
- [logIn, restoreAuth, restoreUserData],
+ [logIn, getAndUpdateDeviceListsForUsers, restoreAuth, restoreUserData],
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 17, 10:53 PM (9 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5949231
Default Alt Text
D14567.1768690435.diff (1 KB)
Attached To
Mode
D14567: [native] Sync own device list after restore
Attached
Detach File
Event Timeline
Log In to Comment