Skip to content

Commit e8431e9

Browse files
committed
Merge remote-tracking branch 'origin/main' into refactor/unlock-deep-defi-v5-compat
2 parents c4fb865 + 5be6048 commit e8431e9

File tree

101 files changed

+2683
-694
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2683
-694
lines changed

.github/workflows/update-release-changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
with:
5050
release-branch: ${{ github.ref_name }}
5151
repository-url: ${{ github.server_url }}/${{ github.repository }}
52-
platform: mobile
52+
platform: extension
5353
github-tools-version: 36dc168896c1b496f35fc880ee8a3625b4b837ba
5454
previous-version-ref: null
5555
secrets:

app/_locales/en/messages.json

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/_locales/en_GB/messages.json

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/scripts/constants/sentry-state.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export const SENTRY_BACKGROUND_STATE = {
9292
lastUpdatedAt: true,
9393
shieldEndingToastLastClickedOrClosed: true,
9494
shieldPausedToastLastClickedOrClosed: true,
95+
isWalletResetInProgress: false,
9596
},
9697
MultichainBalancesController: {
9798
balances: false,

app/scripts/controllers/app-state-controller.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ describe('AppStateController', () => {
773773
"hasShownMultichainAccountsIntroModal": false,
774774
"isRampCardClosed": false,
775775
"isUpdateAvailable": false,
776+
"isWalletResetInProgress": false,
776777
"lastInteractedConfirmationInfo": {
777778
"chainId": "0x1",
778779
"id": "123",
@@ -861,6 +862,7 @@ describe('AppStateController', () => {
861862
"hasShownMultichainAccountsIntroModal": false,
862863
"isRampCardClosed": false,
863864
"isUpdateAvailable": false,
865+
"isWalletResetInProgress": false,
864866
"lastInteractedConfirmationInfo": {
865867
"chainId": "0x1",
866868
"id": "123",
@@ -941,6 +943,7 @@ describe('AppStateController', () => {
941943
"hadAdvancedGasFeesSetPriorToMigration92_3": false,
942944
"hasShownMultichainAccountsIntroModal": false,
943945
"isRampCardClosed": false,
946+
"isWalletResetInProgress": false,
944947
"lastInteractedConfirmationInfo": {
945948
"chainId": "0x1",
946949
"id": "123",
@@ -1023,6 +1026,7 @@ describe('AppStateController', () => {
10231026
"hasShownMultichainAccountsIntroModal": false,
10241027
"isRampCardClosed": false,
10251028
"isUpdateAvailable": false,
1029+
"isWalletResetInProgress": false,
10261030
"lastInteractedConfirmationInfo": {
10271031
"chainId": "0x1",
10281032
"id": "123",

app/scripts/controllers/app-state-controller.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ export type AppStateControllerState = {
123123
updateModalLastDismissedAt: number | null;
124124
hasShownMultichainAccountsIntroModal: boolean;
125125
showShieldEntryModalOnce: boolean | null;
126+
127+
/**
128+
* Whether the wallet reset is in progress.
129+
*/
130+
isWalletResetInProgress: boolean;
126131
};
127132

128133
const controllerName = 'AppStateController';
@@ -270,6 +275,8 @@ const getDefaultAppStateControllerState = (): AppStateControllerState => ({
270275
updateModalLastDismissedAt: null,
271276
hasShownMultichainAccountsIntroModal: false,
272277
showShieldEntryModalOnce: null,
278+
isWalletResetInProgress: false,
279+
273280
...getInitialStateOverrides(),
274281
});
275282

@@ -607,6 +614,12 @@ const controllerMetadata: StateMetadata<AppStateControllerState> = {
607614
includeInDebugSnapshot: true,
608615
usedInUi: true,
609616
},
617+
isWalletResetInProgress: {
618+
persist: true,
619+
includeInDebugSnapshot: true,
620+
usedInUi: true,
621+
includeInStateLogs: true,
622+
},
610623
};
611624

612625
export class AppStateController extends BaseController<
@@ -1520,4 +1533,14 @@ export class AppStateController extends BaseController<
15201533
state.canTrackWalletFundsObtained = enabled;
15211534
});
15221535
}
1536+
1537+
setIsWalletResetInProgress(isResetting: boolean): void {
1538+
this.update((state) => {
1539+
state.isWalletResetInProgress = isResetting;
1540+
});
1541+
}
1542+
1543+
getIsWalletResetInProgress(): boolean {
1544+
return this.state.isWalletResetInProgress;
1545+
}
15231546
}

app/scripts/controllers/onboarding.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,16 @@ export default class OnboardingController extends BaseController<
235235
firstTimeFlowType === FirstTimeFlowType.socialImport
236236
);
237237
}
238+
239+
/**
240+
* Reset the onboarding controller state.
241+
*/
242+
resetOnboarding(): void {
243+
this.update((state) => {
244+
state.completedOnboarding = false;
245+
state.firstTimeFlowType = null;
246+
state.seedPhraseBackedUp = null;
247+
state.onboardingTabs = {};
248+
});
249+
}
238250
}

0 commit comments

Comments
 (0)