Skip to content

Commit a308fc4

Browse files
committed
fix: back to onboarding page
1 parent 44dcb3b commit a308fc4

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

packages/extension-polkagate/src/fullscreen/partials/ForgetAccountModal.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export default function ForgetAccountModal ({ account, setDisplayPopup }: Props)
3535
const [isPasswordError, setIsPasswordError] = useState(false);
3636
const needsPasswordConfirmation = !account.isExternal;
3737

38+
const notOnHome = window.location.hash !== '#/';
39+
3840
useEffect(() => {
3941
cryptoWaitReady().then(() => keyring.loadAll({ store: new AccountsStore() })).catch(() => null);
4042
}, []);
@@ -80,7 +82,7 @@ export default function ForgetAccountModal ({ account, setDisplayPopup }: Props)
8082
notify(t('{{accountName}} has been successfully removed!', { replace: { accountName: account?.name || 'Unknown' } }), 'success');
8183

8284
backToAccount();
83-
onAction('/');
85+
notOnHome && onAction('/');
8486
})
8587
.catch((error: Error) => {
8688
setIsBusy(false);
@@ -91,7 +93,7 @@ export default function ForgetAccountModal ({ account, setDisplayPopup }: Props)
9193
setIsBusy(false);
9294
console.error('Error forgetting the account:', error);
9395
}
94-
}, [account, backToAccount, needsPasswordConfirmation, notify, onAction, password, t, updateAuthAccountsList]);
96+
}, [account.address, account?.name, backToAccount, notOnHome, needsPasswordConfirmation, notify, onAction, password, t, updateAuthAccountsList]);
9597

9698
const onChangePass = useCallback((pass: string): void => {
9799
setPassword(pass);

packages/extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"sideEffects": false,
1717
"type": "module",
18-
"version": "0.33.0",
18+
"version": "0.33.2",
1919
"dependencies": {
2020
"@polkadot/api": "^11.2.1",
2121
"@polkadot/extension-base": "^0.47.5",

packages/extension/src/packageInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

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

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

0 commit comments

Comments
 (0)