Skip to content

Commit 03c7824

Browse files
committed
Merge branch 'main' into predict/clob-v2-cleanup-core
* main: feat: add Tempo chain as additionnal network (#29515) feat: add token list security badges (#29509) fix: percentage buttons for money account withdraw (#29339) feat(predict): Add Funds / Change Payment Method CTA (#29461) chore: enable swaps asset picker security tags (#29570) test: mock accounts v4 transactions endpoint (#29569) feat: money account transaction - add default value for accountOverride (#29332) fix: Refine Perps section and empty state patterns to match Home and Money (#29009)
2 parents 049fb3b + 2b5fd98 commit 03c7824

82 files changed

Lines changed: 3766 additions & 922 deletions

File tree

Some content is hidden

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

.github/scripts/known-feature-flag-constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const FILE_SOURCES: Array<{ key: string; file: string; exportName: string }> = [
1212
{ key: 'BITCOIN_REWARDS_FLAG_NAME', file: REWARDS_FILE, exportName: 'BITCOIN_REWARDS_FLAG_NAME' },
1313
{ key: 'TRON_REWARDS_FLAG_NAME', file: REWARDS_FILE, exportName: 'TRON_REWARDS_FLAG_NAME' },
1414
{ key: 'SNAPSHOTS_REWARDS_FLAG_NAME', file: REWARDS_FILE, exportName: 'SNAPSHOTS_REWARDS_FLAG_NAME' },
15+
{ key: 'TOKEN_LIST_SECURITY_BADGES_FLAG_KEY', file: sel('tokenListSecurityBadges'), exportName: 'TOKEN_LIST_SECURITY_BADGES_FLAG_KEY' },
1516
{ key: 'MISSING_ENROLLED_ACCOUNTS_FLAG_NAME', file: REWARDS_FILE, exportName: 'MISSING_ENROLLED_ACCOUNTS_FLAG_NAME' },
1617
{ key: 'NETWORK_MANAGEMENT_FLAG_KEY', file: sel('networkManagement'), exportName: 'NETWORK_MANAGEMENT_FLAG_KEY' },
1718
// FEATURE_FLAG_NAME is omitted (non-unique across rwa / gasFeesSponsored); per-file fallback handles it.

app/components/UI/Bridge/components/TokenSelectorItem.config.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

app/components/UI/Bridge/components/TokenSelectorItem.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import {
1212
TOKEN_RATE_UNDEFINED,
1313
} from '../../Tokens/constants';
1414

15-
jest.mock('./TokenSelectorItem.config', () => ({ SHOW_TOKEN_WARNINGS: true }));
16-
1715
jest.mock('react-redux', () => ({
1816
useSelector: jest.fn(() => []),
1917
}));

app/components/UI/Bridge/components/TokenSelectorItem.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ import {
6161
IconName,
6262
IconSize,
6363
} from '@metamask/design-system-react-native';
64-
import { SHOW_TOKEN_WARNINGS } from './TokenSelectorItem.config';
6564
import { getBridgeTokenSecurityConfig } from '../utils/tokenSecurityUtils';
6665

6766
const createStyles = ({
@@ -321,9 +320,7 @@ export const TokenSelectorItem: React.FC<TokenSelectorItemProps> = ({
321320
? ACCOUNT_TYPE_LABELS[token.accountType]
322321
: undefined;
323322

324-
const securityTag = SHOW_TOKEN_WARNINGS
325-
? getSecurityTag(token.securityData?.type)
326-
: null;
323+
const securityTag = getSecurityTag(token.securityData?.type);
327324

328325
return (
329326
<Box

app/components/UI/Perps/Perps.testIds.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ export const PerpsHomeViewSelectorsIDs = {
224224
BACK_HOME_BUTTON: 'perps-home-back-button',
225225
SEARCH_TOGGLE: 'perps-home-search-toggle',
226226
SEARCH_INPUT: 'perps-home-search',
227+
/** Scroll title row (`PerpsHomeHeader` with `segment="title"`) */
228+
HOME_HEADING: 'perps-home-heading',
227229
SCROLL_CONTENT: 'scroll-content',
228230
WITHDRAW_BUTTON: 'perps-home-withdraw-button',
229231
ADD_FUNDS_BUTTON: 'perps-home-add-funds-button',

app/components/UI/Perps/Views/PerpsHomeView/PerpsHomeView.styles.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,7 @@ const styleSheet = (params: { theme: Theme }) => {
127127
paddingHorizontal: 16,
128128
},
129129
positionsOrdersContainer: {
130-
marginHorizontal: 16,
131-
borderRadius: 16,
132130
paddingHorizontal: 16,
133-
paddingVertical: 4,
134-
backgroundColor: colors.background.section,
135131
},
136132
});
137133
};

app/components/UI/Perps/Views/PerpsHomeView/PerpsHomeView.test.tsx

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,23 +266,37 @@ jest.mock('../../components/PerpsHomeHeader', () => {
266266
jest.requireActual('react-native');
267267

268268
interface MockPerpsHomeHeaderProps {
269-
onSearchToggle: () => void;
270-
onBack: () => void;
269+
segment?: 'nav' | 'title';
270+
screenTitle?: string;
271+
onSearchToggle?: () => void;
272+
onBack?: () => void;
271273
isSearchVisible?: boolean;
272274
searchQuery?: string;
273275
onSearchQueryChange?: (text: string) => void;
274276
onSearchClear?: () => void;
275-
testID: string;
277+
testID?: string;
276278
}
277279

278-
return function MockPerpsHomeHeader({
280+
function MockPerpsHomeHeader({
281+
segment = 'nav',
282+
screenTitle = 'Perps',
279283
onSearchToggle,
280284
onBack,
281285
isSearchVisible = false,
282286
searchQuery = '',
283287
onSearchQueryChange,
284288
testID,
285289
}: MockPerpsHomeHeaderProps) {
290+
if (segment === 'title') {
291+
return (
292+
<View testID={testID}>
293+
<Text testID={testID ? `${testID}-title` : undefined}>
294+
{screenTitle}
295+
</Text>
296+
</View>
297+
);
298+
}
299+
286300
if (isSearchVisible) {
287301
return (
288302
<View>
@@ -316,6 +330,11 @@ jest.mock('../../components/PerpsHomeHeader', () => {
316330
</TouchableOpacity>
317331
</View>
318332
);
333+
}
334+
335+
return {
336+
__esModule: true,
337+
default: MockPerpsHomeHeader,
319338
};
320339
});
321340
jest.mock('../../components/PerpsHomeSection', () => {

app/components/UI/Perps/Views/PerpsHomeView/PerpsHomeView.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,11 @@ const PerpsHomeView = () => {
433433
onScroll={handleScroll}
434434
scrollEventThrottle={16}
435435
>
436+
<PerpsHomeHeader
437+
segment="title"
438+
testID={PerpsHomeViewSelectorsIDs.HOME_HEADING}
439+
/>
440+
436441
{/* Balance Actions Component */}
437442
<PerpsMarketBalanceActions
438443
showActionButtons={HOME_SCREEN_CONFIG.ShowHeaderActionButtons}

app/components/UI/Perps/components/PerpsCard/PerpsCard.styles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const styleSheet = (params: { theme: Theme; vars: { iconSize: number } }) => {
2222
width: iconSize,
2323
height: iconSize,
2424
borderRadius: iconSize / 2,
25-
marginRight: 12,
25+
marginRight: 16,
2626
},
2727
cardInfo: {
2828
flex: 1,

app/components/UI/Perps/components/PerpsEmptyBalance/PerpsEmptyBalance.styles.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)