-
-
Notifications
You must be signed in to change notification settings - Fork 137
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Sometimes, when I save my wallet, I am not redirected back to /wallets. I saw in the console that the route change was aborted.
I have not found out how to reproduce this yet and don't see any issue with this code:
stacker.news/wallets/client/components/form/settings.js
Lines 31 to 53 in f0e3516
| const onSubmit = useCallback(async (settings) => { | |
| try { | |
| await saveWallet() | |
| await setSettings({ | |
| variables: { settings }, | |
| update: (cache, { data }) => { | |
| cache.writeQuery({ | |
| query: WALLET_SETTINGS, | |
| data: { | |
| walletSettings: { | |
| __typename: 'WalletSettings', | |
| ...data?.setWalletSettings | |
| } | |
| } | |
| }) | |
| } | |
| }) | |
| router.push('/wallets') | |
| } catch (err) { | |
| console.error(err) | |
| toaster.danger('failed to save wallet') | |
| } | |
| }, [saveWallet, setSettings, toaster, router]) |
Screenshots
No response
Steps To Reproduce
- ???
- Save wallet
- No redirect (sometimes)
Expected behavior
Successful save always redirects to /wallets
Logs
No response
Device information
No response
Additional context
No response
Reactions are currently unavailable