@@ -146,6 +146,8 @@ export const NotificationService: React.FC<Props> = (props: Props) => {
146146 // Update notification info with
147147 // 1. Date last received if transitioning from incomplete to complete
148148 // 2. Reset `isBannerHidden` if it's a new notification
149+ // NOTE: lightAccountReminder is handled by a separate effect below to
150+ // avoid race conditions.
149151 useAsyncEffect (
150152 async ( ) => {
151153 // New token(s) detected
@@ -165,11 +167,6 @@ export const NotificationService: React.FC<Props> = (props: Props) => {
165167 }
166168
167169 await updateNotificationInfo ( account , 'ip2FaReminder' , isIp2faReminder )
168- await updateNotificationInfo (
169- account ,
170- 'lightAccountReminder' ,
171- isLightAccountReminder
172- )
173170 await updateNotificationInfo (
174171 account ,
175172 'otpReminder' ,
@@ -201,12 +198,10 @@ export const NotificationService: React.FC<Props> = (props: Props) => {
201198 } ,
202199 [
203200 isIp2faReminder ,
204- isLightAccountReminder ,
205201 isOtpReminder ,
206202 isPwReminder ,
207203 wallets ,
208204 detectedTokensRedux ,
209- notifState ,
210205 accountReferral ,
211206 accountReferralLoaded ,
212207 countryCode ,
@@ -215,9 +210,11 @@ export const NotificationService: React.FC<Props> = (props: Props) => {
215210 'NotificationServices'
216211 )
217212
218- // Make sure the backup banner is always shown on login if needed. We do this
219- // separately in this effect so that we can hide the banner during current
220- // login session if they so choose.
213+ // Make sure the backup banner is always shown on login if needed. This is
214+ // kept as a separate effect with minimal dependencies to avoid race
215+ // conditions with the effect above. The dependency on isLightAccountReminder
216+ // (which only changes at login) ensures this runs once per login.
217+ // Users can still hide the banner during the current login session.
221218 useAsyncEffect (
222219 async ( ) => {
223220 if ( ! isLightAccountReminder ) return
0 commit comments