Testing for canSend is not enough since it can also return true if the wallet is not enabled.
This is the case because we want to allow disabling wallets but canSend must still return true in this case if send is configured.
This should probably be changed such that canSend only returns true when the wallet is enabled without preventing disabling of wallets.
* Add wallet filters
* Fix grid layout shift
* Store filter state in query params
* Use auto-fill instead of auto-fit
This doesn't seem to change anything but this is closer to our intention how the grid should work with fixed column width.
* Use same order for filters as icons in card
* Use state update function
* Use user-select: none for wallet filters
* Remove unnecessary '|| false'
* Add media query to keep centered grid layout on small screens
* Decrease wallet filter margin-top to 1rem
* fix wallet support usage
* improve grid
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
Co-authored-by: k00b <k00b@stacker.news>
* Don't fetch logs as anon
* Only fetch logs if we need them on the current page
* Wait for poll to finish with setTimeout
This makes sure that we wait for the pending poll to finish before we poll again. This prevents running multiple polls at the same time on slow connections.
I noticed we don't need to queue a new poll ourselves since a poll updates effect dependencies so we will cleanup and run the effect again anyway.
* Fix polling via useEffect abuse
* Always switch to user we just logged in as
If we're logged in and switch to anon and then use login to get into our previous account instead of using 'switch accounts', we only updated the JWT but we didn't switch to the user.
* Fix getToken unaware of multi-auth middleware
If we use login with new credentials while switched to anon (multi_auth.user-id === 'anonymous'), we updated the pubkey because getToken wasn't aware of the switch and thus believed we're logged in as a user.
This is fixed by applying the middleware before calling getToken.