T3216
Simplified rebuild of D14356 as per feedback.
Overview:
- `pendingAliases` array is now stored in the existing cashtabCache object in localForage
- useWallet.js' `useEffect()` function creates the interval which runs forever every 30 seconds as long as the app is open
- `pendingAliasCheck` is now moved to useWallet, which updates the cashtabCache with the latest pending aliases list via `updatePendingAliasArrayInLocalForage`
- Alias.js' `useEffect()` function now simply retrieves the latest pending list from localForage via `getPendingAliasesFromLocalForage()`
- Alias.js' `useEffect()` also has cashtabCache added as a dependency to trigger component refreshes
However:
- When `updatePendingAliasArrayInLocalForage` is called in useWallet's 30 sec interval checks to update `cashtabCache`, it doesn't translate to an automatic state refresh for Alias.js even though `cashtabCache` is a dependency in Alias.js' `useEffect()` function. I also tried with `cashtabCache.pendingAliases` as well to no avail.
- So when an alias is confirmed as registered in the background, the Alias.js page doesn't update the Pending Aliases dropdown until you refresh/revisit the page.
- This also becomes an issue when registering a new Alias, the pending list dropdown does not update until you similarly refresh/revisit the page.
- Hence I'm leaning back towards using a dedicated refresh trigger state variable but subject to further feedback.
Note: I've kepted the debug logs in there for ease of review and will remove them prior to landing.