Skip to content

Commit ae7e5cb

Browse files
Fix lint
1 parent 7eb54a1 commit ae7e5cb

File tree

1 file changed

+28
-31
lines changed

1 file changed

+28
-31
lines changed

ui/hooks/useMultichainAccountsIntroModal.test.ts

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
1-
import { renderHookWithProvider } from "../../test/lib/render-helpers";
2-
import { useMultichainAccountsIntroModal, BIP44_ACCOUNTS_INTRODUCTION_VERSION } from "./useMultichainAccountsIntroModal";
1+
import { renderHookWithProvider } from '../../test/lib/render-helpers';
2+
import {
3+
useMultichainAccountsIntroModal,
4+
BIP44_ACCOUNTS_INTRODUCTION_VERSION,
5+
} from './useMultichainAccountsIntroModal';
36

47
describe('useMultichainAccountsIntroModal', () => {
5-
6-
const renderHook = (isUnlocked: boolean, isMultichainAccountsEnabled: boolean,
8+
const renderHook = (
9+
isUnlocked: boolean,
10+
isMultichainAccountsEnabled: boolean,
711
hasShownMultichainAccountsIntroModal: boolean,
812
lastUpdatedAt: number | null,
913
previousAppVersion: string | null,
10-
pathname: string
14+
pathname: string,
1115
) => {
12-
return renderHookWithProvider(() => useMultichainAccountsIntroModal(isUnlocked, { pathname }), {
13-
metamask: {
14-
remoteFeatureFlags: {
15-
enableMultichainAccountsState2: { enabled: isMultichainAccountsEnabled, featureVersion: "2", minimumVersion: BIP44_ACCOUNTS_INTRODUCTION_VERSION },
16+
return renderHookWithProvider(
17+
() => useMultichainAccountsIntroModal(isUnlocked, { pathname }),
18+
{
19+
metamask: {
20+
remoteFeatureFlags: {
21+
enableMultichainAccountsState2: {
22+
enabled: isMultichainAccountsEnabled,
23+
featureVersion: '2',
24+
minimumVersion: BIP44_ACCOUNTS_INTRODUCTION_VERSION,
25+
},
26+
},
27+
hasShownMultichainAccountsIntroModal,
28+
previousAppVersion,
29+
lastUpdatedAt,
1630
},
17-
hasShownMultichainAccountsIntroModal,
18-
previousAppVersion,
19-
lastUpdatedAt,
20-
}
21-
});
22-
}
31+
},
32+
);
33+
};
2334

2435
describe('shows banner correctly', () => {
2536
const baseParams = {
@@ -117,14 +128,7 @@ describe('useMultichainAccountsIntroModal', () => {
117128
});
118129

119130
it('does NOT show for fresh install (no previous version)', () => {
120-
const { result } = renderHook(
121-
true,
122-
true,
123-
false,
124-
Date.now(),
125-
null,
126-
'/',
127-
);
131+
const { result } = renderHook(true, true, false, Date.now(), null, '/');
128132
expect(result.current.showMultichainIntroModal).toBe(false);
129133
});
130134

@@ -177,14 +181,7 @@ describe('useMultichainAccountsIntroModal', () => {
177181
});
178182

179183
it('does NOT show for fresh install (lastUpdatedAt is null)', () => {
180-
const { result } = renderHook(
181-
true,
182-
true,
183-
false,
184-
null,
185-
'13.4.0',
186-
'/',
187-
);
184+
const { result } = renderHook(true, true, false, null, '13.4.0', '/');
188185
expect(result.current.showMultichainIntroModal).toBe(false);
189186
});
190187
});

0 commit comments

Comments
 (0)