release #111
@ -94,15 +94,6 @@ export const MainLayout = () => {
|
||||
metadataController.findMetadata(usersPubkey).then((metadataEvent) => {
|
||||
if (metadataEvent) handleMetadataEvent(metadataEvent)
|
||||
})
|
||||
|
||||
setLoadingSpinnerDesc(`Fetching user's app data`)
|
||||
getUsersAppData()
|
||||
.then((appData) => {
|
||||
if (appData) {
|
||||
dispatch(updateUserAppData(appData))
|
||||
}
|
||||
})
|
||||
.finally(() => setIsLoading(false))
|
||||
} else {
|
||||
setIsLoading(false)
|
||||
}
|
||||
@ -118,11 +109,6 @@ export const MainLayout = () => {
|
||||
const pubkey = authState.usersPubkey || authState.keyPair?.public
|
||||
|
||||
if (pubkey) {
|
||||
/**
|
||||
* Sigit notifications are wrapped using nip 59 seal and gift wrap scheme.
|
||||
* According to nip59 created_at for seal and gift wrap should be tweaked to thwart time-analysis attacks.
|
||||
* For the above purpose created_at is set to random time upto 2 days in past
|
||||
*/
|
||||
subscribeForSigits(pubkey).then((res) => {
|
||||
subCloser = res || null
|
||||
})
|
||||
@ -148,6 +134,16 @@ export const MainLayout = () => {
|
||||
if (pubkey) {
|
||||
dispatch(setUserRobotImage(getRoboHashPicture(pubkey)))
|
||||
}
|
||||
|
||||
setIsLoading(true)
|
||||
setLoadingSpinnerDesc(`Fetching user's app data`)
|
||||
getUsersAppData()
|
||||
.then((appData) => {
|
||||
if (appData) {
|
||||
dispatch(updateUserAppData(appData))
|
||||
}
|
||||
})
|
||||
.finally(() => setIsLoading(false))
|
||||
}
|
||||
}, [authState])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user