Skip to content

Commit

Permalink
fix: back to onboarding page (#1687)
Browse files Browse the repository at this point in the history
  • Loading branch information
AMIRKHANEF authored Dec 4, 2024
1 parent 44dcb3b commit b13be69
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export default function ForgetAccountModal ({ account, setDisplayPopup }: Props)
const [isPasswordError, setIsPasswordError] = useState(false);
const needsPasswordConfirmation = !account.isExternal;

const notOnHome = window.location.hash !== '#/';

useEffect(() => {
cryptoWaitReady().then(() => keyring.loadAll({ store: new AccountsStore() })).catch(() => null);
}, []);
Expand Down Expand Up @@ -80,7 +82,7 @@ export default function ForgetAccountModal ({ account, setDisplayPopup }: Props)
notify(t('{{accountName}} has been successfully removed!', { replace: { accountName: account?.name || 'Unknown' } }), 'success');

backToAccount();
onAction('/');
notOnHome && onAction('/');
})
.catch((error: Error) => {
setIsBusy(false);
Expand All @@ -91,7 +93,7 @@ export default function ForgetAccountModal ({ account, setDisplayPopup }: Props)
setIsBusy(false);
console.error('Error forgetting the account:', error);
}
}, [account, backToAccount, needsPasswordConfirmation, notify, onAction, password, t, updateAuthAccountsList]);
}, [account.address, account.name, backToAccount, notOnHome, needsPasswordConfirmation, notify, onAction, password, t, updateAuthAccountsList]);

const onChangePass = useCallback((pass: string): void => {
setPassword(pass);
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"sideEffects": false,
"type": "module",
"version": "0.33.0",
"version": "0.33.2",
"dependencies": {
"@polkadot/api": "^11.2.1",
"@polkadot/extension-base": "^0.47.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/packageInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

// Do not edit, auto-generated by @polkadot/dev

export const packageInfo = { name: '@polkadot/extension', path: 'auto', type: 'auto', version: '0.33.0' };
export const packageInfo = { name: '@polkadot/extension', path: 'auto', type: 'auto', version: '0.33.2' };

0 comments on commit b13be69

Please sign in to comment.