Open secretchaingirl opened 3 years ago
this is probably a refresh optimization cc @Cashmaney
this is probably a refresh optimization cc @Cashmaney
Swap rates are also not recalculated post transactions (fail nor success). After successful tx: on-screen rate doesn’t seem to change (while the transaction should’ve changed the swap rate). After failed tx: At busier times, another user might have swapped after your swap-rate calculation and before your Keplr tx. -> Result: slippage. Should recalculate, but instead, now you’re forced to wait until an invisible timer refreshes your swap rates.
EDIT: Refresh optimization could also be implemented by stopping to refresh when the browser tab is out of focus. Here's what I wrote about it last week: Personally I feel like there is no need to keep updating swap pairs when the swap page is not the active browser tab. But upon re-jumping back to the swap tab, I’d like the pair to recalculate and see the latest price, instead of waiting for the invisible timer to recalculate it.
Is it possible to update the UI with the balance of a token after a viewing key has been created?
Currently the UI continues to display the 🔎 magnifying glass and "View Balance". I really think the UI should automatically update to show the balance instead of having the user always reloading the page.
This would be a great change to anywhere there's a viewing key required.