Skip to content

Commit 45dcf8d

Browse files
committed
fix: removed connection removal modal from home page
1 parent 576552a commit 45dcf8d

File tree

7 files changed

+2
-38
lines changed

7 files changed

+2
-38
lines changed

app/scripts/metamask-controller.actions.test.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -835,10 +835,7 @@ describe('MetaMaskController', function () {
835835
// We now need the Snap keyring after unlocking the wallet.
836836
jest.spyOn(metamaskController, 'getSnapKeyring').mockReturnValue({});
837837

838-
const syncAndUnlockResult =
839-
await metamaskController.syncPasswordAndUnlockWallet(password);
840-
841-
expect(syncAndUnlockResult).toBe(true);
838+
await metamaskController.syncPasswordAndUnlockWallet(password);
842839
expect(keyringSubmitPwdSpy).toHaveBeenCalled();
843840
expect(seedlessSubmitPwdSpy).toHaveBeenCalled();
844841
});

ui/ducks/app/app.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ type AppState = {
132132
errorInSettings: string | null;
133133
showNewSrpAddedToast: boolean;
134134
showPasswordChangeToast: PasswordChangeToastType | null;
135-
showConnectionsRemovedModal: boolean;
136135
showCopyAddressToast: boolean;
137136
showClaimSubmitToast: ClaimSubmitToastType | null;
138137
shieldEntryModal?: {
@@ -243,7 +242,6 @@ const initialState: AppState = {
243242
showCopyAddressToast: false,
244243
showClaimSubmitToast: null,
245244
showSupportDataConsentModal: false,
246-
showConnectionsRemovedModal: false,
247245
};
248246

249247
export default function reduceApp(
@@ -799,11 +797,6 @@ export default function reduceApp(
799797
showSupportDataConsentModal: action.payload,
800798
};
801799

802-
case actionConstants.SET_SHOW_CONNECTIONS_REMOVED:
803-
return {
804-
...appState,
805-
showConnectionsRemovedModal: action.value,
806-
};
807800
case actionConstants.SET_SHOW_SHIELD_ENTRY_MODAL_ONCE:
808801
return {
809802
...appState,

ui/pages/home/home.component.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ import { AccountOverview } from '../../components/multichain/account-overview';
6868
import { setEditedNetwork } from '../../store/actions';
6969
import { navigateToConfirmation } from '../confirmations/hooks/useConfirmationNavigation';
7070
import PasswordOutdatedModal from '../../components/app/password-outdated-modal';
71-
import ConnectionsRemovedModal from '../../components/app/connections-removed-modal';
7271
import ShieldEntryModal from '../../components/app/shield-entry-modal';
7372
///: BEGIN:ONLY_INCLUDE_IF(build-beta)
7473
import BetaHomeFooter from './beta/beta-home-footer.component';
@@ -169,7 +168,6 @@ export default class Home extends PureComponent {
169168
setAccountDetailsAddress: PropTypes.func,
170169
isSeedlessPasswordOutdated: PropTypes.bool,
171170
isPrimarySeedPhraseBackedUp: PropTypes.bool,
172-
showConnectionsRemovedModal: PropTypes.bool,
173171
showShieldEntryModal: PropTypes.bool,
174172
isSocialLoginFlow: PropTypes.bool,
175173
lookupSelectedNetworks: PropTypes.func.isRequired,
@@ -866,7 +864,6 @@ export default class Home extends PureComponent {
866864
showUpdateModal,
867865
isSeedlessPasswordOutdated,
868866
isPrimarySeedPhraseBackedUp,
869-
showConnectionsRemovedModal,
870867
showShieldEntryModal,
871868
isSocialLoginFlow,
872869
} = this.props;
@@ -934,7 +931,6 @@ export default class Home extends PureComponent {
934931
{showTermsOfUse ? (
935932
<TermsOfUsePopup onAccept={this.onAcceptTermsOfUse} />
936933
) : null}
937-
{showConnectionsRemovedModal && <ConnectionsRemovedModal />}
938934
{showShieldEntryModal && <ShieldEntryModal />}
939935
{isPopup && !connectedStatusPopoverHasBeenShown
940936
? this.renderPopover()

ui/pages/home/home.container.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
getEditedNetwork,
2929
selectPendingApprovalsForNavigation,
3030
getShowUpdateModal,
31-
getShowConnectionsRemovedModal,
3231
getIsSocialLoginFlow,
3332
getShowShieldEntryModal,
3433
getPendingShieldCohort,
@@ -192,7 +191,6 @@ const mapStateToProps = (state) => {
192191
redirectAfterDefaultPage,
193192
isSeedlessPasswordOutdated: getIsSeedlessPasswordOutdated(state),
194193
isPrimarySeedPhraseBackedUp: getIsPrimarySeedPhraseBackedUp(state),
195-
showConnectionsRemovedModal: getShowConnectionsRemovedModal(state),
196194
showShieldEntryModal: getShowShieldEntryModal(state),
197195
isSocialLoginFlow: getIsSocialLoginFlow(state),
198196
pendingShieldCohort: getPendingShieldCohort(state),

ui/selectors/selectors.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,6 @@ export function getKeyringSnapRemovalResult(state) {
289289

290290
export const getPendingTokens = (state) => state.appState.pendingTokens;
291291

292-
export function getShowConnectionsRemovedModal(state) {
293-
return state.appState.showConnectionsRemovedModal;
294-
}
295-
296292
export function getShowShieldEntryModal(state) {
297293
return state.appState.shieldEntryModal?.show;
298294
}

ui/store/actionConstants.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,5 @@ export const SET_SHOW_CLAIM_SUBMIT_TOAST = 'SET_SHOW_CLAIM_SUBMIT_TOAST';
196196
export const SET_SHOW_SUPPORT_DATA_CONSENT_MODAL =
197197
'SET_SHOW_SUPPORT_DATA_CONSENT_MODAL';
198198

199-
export const SET_SHOW_CONNECTIONS_REMOVED = 'SET_SHOW_CONNECTIONS_REMOVED';
200-
201199
export const SET_SHOW_SHIELD_ENTRY_MODAL_ONCE =
202200
'SET_SHOW_SHIELD_ENTRY_MODAL_ONCE';

ui/store/actions.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -856,16 +856,11 @@ export function tryUnlockMetamask(
856856
callBackgroundMethod(
857857
'syncPasswordAndUnlockWallet',
858858
[password],
859-
(error, isPasswordSynced) => {
859+
(error) => {
860860
if (error) {
861861
reject(error);
862862
return;
863863
}
864-
// if password is not synced show connections removal warning to user.
865-
if (!isPasswordSynced) {
866-
dispatch(setShowConnectionsRemovedModal(true));
867-
}
868-
869864
resolve();
870865
},
871866
);
@@ -2488,15 +2483,6 @@ export function unlockSucceeded(message?: string) {
24882483
};
24892484
}
24902485

2491-
export function setShowConnectionsRemovedModal(
2492-
showConnectionsRemovedModal: boolean,
2493-
) {
2494-
return {
2495-
type: actionConstants.SET_SHOW_CONNECTIONS_REMOVED,
2496-
value: showConnectionsRemovedModal,
2497-
};
2498-
}
2499-
25002486
export function updateMetamaskState(
25012487
patches: Patch[],
25022488
): ThunkAction<void, MetaMaskReduxState, unknown, AnyAction> {

0 commit comments

Comments
 (0)