Skip to content

Redirect to /wallets on save is sometimes aborted #2496

@ekzyis

Description

@ekzyis

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:

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

  1. ???
  2. Save wallet
  3. No redirect (sometimes)

Expected behavior

Successful save always redirects to /wallets

Logs

No response

Device information

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions