1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

use history.replace() instead of history.push() (#18663)

This commit is contained in:
Guillaume Roux 2023-04-19 20:38:27 +02:00 committed by GitHub
parent 4e1a96b4ef
commit 21e07ae6ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -116,7 +116,7 @@ export default class PermissionConnect extends Component {
getRequestAccountTabIds();
if (!permissionsRequest) {
history.push(DEFAULT_ROUTE);
history.replace(DEFAULT_ROUTE);
return;
}
@ -130,17 +130,17 @@ export default class PermissionConnect extends Component {
switch (requestType) {
case 'wallet_installSnap':
history.push(snapInstallPath);
history.replace(snapInstallPath);
break;
case 'wallet_updateSnap':
history.push(snapUpdatePath);
history.replace(snapUpdatePath);
break;
case 'wallet_installSnapResult':
history.push(snapResultPath);
history.replace(snapResultPath);
break;
default:
///: END:ONLY_INCLUDE_IN
history.push(confirmPermissionPath);
history.replace(confirmPermissionPath);
///: BEGIN:ONLY_INCLUDE_IN(flask)
}
///: END:ONLY_INCLUDE_IN