Skip to content

Commit 2f10229

Browse files
authored
Merge branch 'main' into fix/card-delegation-issues
2 parents ef710c7 + 3bf2cf9 commit 2f10229

File tree

81 files changed

+3730
-2517
lines changed

Some content is hidden

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

81 files changed

+3730
-2517
lines changed

.yarnrc.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ enableScripts: false
77
nodeLinker: node-modules
88

99
npmAuditIgnoreAdvisories:
10-
### Advisories:
11-
# Issue: Regular Expression Denial of Service (ReDoS) in cross-spawn
12-
# URL - https://github.com/advisories/GHSA-3xgq-45jj-v275
13-
# The affected versions <6.0.6, is only present in wdio which is a dev dependency
14-
- 1104663
1510

1611
yarnPath: .yarn/releases/yarn-4.10.3.cjs
1712

CHANGELOG.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [7.57.1]
11+
12+
### Fixed
13+
14+
- fix: show edit account bottomsheet on android when its behind the keyboard ([#21477](https://github.com/MetaMask/metamask-mobile/pull/21477))
15+
- fix: Patch touchable issue in React Native ([#21568](https://github.com/MetaMask/metamask-mobile/pull/21568))
16+
1017
## [7.57.0]
1118

1219
### Added
@@ -403,35 +410,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
403410
## [7.56.5]
404411

405412
### Fixed
406-
- fix: use SharedDeeplinkManager to parse instead of Linking API ([#20960](https://github.com/MetaMask/metamask-mobile/pull/20960))
413+
* fix: use SharedDeeplinkManager to parse instead of Linking API ([#20960](https://github.com/MetaMask/metamask-mobile/pull/20960))
407414

408415
## [7.56.4]
409416

410417
### Fixed
411-
- fix: address feature flag config issue
418+
* fix: address feature flag config issue
412419

413420
## [7.56.3]
414421

415422
### Fixed
416-
- fix: remove unintended metrics from transaction finalised event ([#20733](https://github.com/MetaMask/metamask-mobile/pull/20733))
417-
- fix: force rendering on token list when order changes ([#20771](https://github.com/MetaMask/metamask-mobile/pull/20771))
418-
- fix: add contentful max version number segmentation ([#20769](https://github.com/MetaMask/metamask-mobile/pull/20769))
423+
* fix: remove unintended metrics from transaction finalised event ([#20733](https://github.com/MetaMask/metamask-mobile/pull/20733))
424+
* fix: force rendering on token list when order changes ([#20771](https://github.com/MetaMask/metamask-mobile/pull/20771))
425+
* fix: add contentful max version number segmentation ([#20769](https://github.com/MetaMask/metamask-mobile/pull/20769))
419426

420427
## [7.56.2]
421428

422429
### Fixed
423-
- fix: address feature flag config issue
430+
* fix: address feature flag config issue
424431

425432
## [7.56.1]
426433

427434
### Fixed
428-
- fix: in recipient validations for internal accounts ([#20694](https://github.com/MetaMask/metamask-mobile/pull/20694))
429-
- feat: iOS Rehydration Flow Update to release/7.56.1 ([#20681](https://github.com/MetaMask/metamask-mobile/pull/20681))
430-
- feat: social login success screen added for social login users and ios platform. ([#20679](https://github.com/MetaMask/metamask-mobile/pull/20679))
431-
- fix: Returned Scrollview to Perps and Defi tab cp-7.56.1 ([#20650](https://github.com/MetaMask/metamask-mobile/pull/20650))
432-
- fix: missing transactions in activity after perps deposit (\#20507) ([09ef7e5](https://github.com/MetaMask/metamask-mobile/commit/09ef7e5f5111d0d3592b5e6d60499f31dc22f013))
433-
- fix: cp-7.56.1 Temp Revert page-level scroll for Wallet (#20579) ([#20616](https://github.com/MetaMask/metamask-mobile/pull/20616))
434-
- fix: Temp Revert page-level scroll for Wallet (\#20579) ([9022244](https://github.com/MetaMask/metamask-mobile/commit/902224410fbdf37250b990c75986eb7a948fb5ec))
435+
* fix: in recipient validations for internal accounts ([#20694](https://github.com/MetaMask/metamask-mobile/pull/20694))
436+
* feat: iOS Rehydration Flow Update to release/7.56.1 ([#20681](https://github.com/MetaMask/metamask-mobile/pull/20681))
437+
* feat: social login success screen added for social login users and ios platform. ([#20679](https://github.com/MetaMask/metamask-mobile/pull/20679))
438+
* fix: Returned Scrollview to Perps and Defi tab cp-7.56.1 ([#20650](https://github.com/MetaMask/metamask-mobile/pull/20650))
439+
* fix: missing transactions in activity after perps deposit (\#20507) ([09ef7e5](https://github.com/MetaMask/metamask-mobile/commit/09ef7e5f5111d0d3592b5e6d60499f31dc22f013))
440+
* fix: cp-7.56.1 Temp Revert page-level scroll for Wallet (#20579) ([#20616](https://github.com/MetaMask/metamask-mobile/pull/20616))
441+
* fix: Temp Revert page-level scroll for Wallet (\#20579) ([9022244](https://github.com/MetaMask/metamask-mobile/commit/902224410fbdf37250b990c75986eb7a948fb5ec))
435442

436443
## [7.56.0]
437444

@@ -2498,7 +2505,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
24982505
- feat: add InlineAlert component ([#13709](https://github.com/MetaMask/metamask-mobile/pull/13709))
24992506
- feat: add MultipleAlertModal component ([#13683](https://github.com/MetaMask/metamask-mobile/pull/13683))
25002507
- feat: Add Snaps UI `Selector` component ([#13747](https://github.com/MetaMask/metamask-mobile/pull/13747))
2501-
- feat: added mocks to sonar.coverage.exclusions ([#13787](https://github.com/MetaMask/metamask-mobile/pull/13787))
2508+
- feat: added **/**mocks**/** to sonar.coverage.exclusions ([#13787](https://github.com/MetaMask/metamask-mobile/pull/13787))
25022509
- feat: add `GeneralAlertBanner` component ([#13627](https://github.com/MetaMask/metamask-mobile/pull/13627))
25032510

25042511
### Fixed
@@ -7632,7 +7639,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
76327639
- [#957](https://github.com/MetaMask/metamask-mobile/pull/957): fix timeouts (#957)
76337640
- [#954](https://github.com/MetaMask/metamask-mobile/pull/954): Bugfix: onboarding navigation (#954)
76347641

7635-
[Unreleased]: https://github.com/MetaMask/metamask-mobile/compare/v7.57.0...HEAD
7642+
[Unreleased]: https://github.com/MetaMask/metamask-mobile/compare/v7.57.1...HEAD
7643+
[7.57.1]: https://github.com/MetaMask/metamask-mobile/compare/v7.57.0...v7.57.1
76367644
[7.57.0]: https://github.com/MetaMask/metamask-mobile/compare/v7.56.5...v7.57.0
76377645
[7.56.5]: https://github.com/MetaMask/metamask-mobile/compare/v7.56.4...v7.56.5
76387646
[7.56.4]: https://github.com/MetaMask/metamask-mobile/compare/v7.56.3...v7.56.4
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
import React from 'react';
2+
import { render } from '@testing-library/react-native';
3+
import { Text, View } from 'react-native';
4+
import ConditionalScrollView from './ConditionalScrollView';
5+
6+
describe('ConditionalScrollView', () => {
7+
const testContent = (
8+
<View>
9+
<Text>Test Content</Text>
10+
</View>
11+
);
12+
13+
describe('when isScrollEnabled is true', () => {
14+
it('wraps children in ScrollView and renders content', () => {
15+
const { getByTestId, getByText } = render(
16+
<ConditionalScrollView
17+
isScrollEnabled
18+
scrollViewProps={{ testID: 'scroll-container' }}
19+
>
20+
{testContent}
21+
</ConditionalScrollView>,
22+
);
23+
24+
expect(getByTestId('scroll-container')).toBeDefined();
25+
expect(getByText('Test Content')).toBeDefined();
26+
});
27+
28+
it('passes scrollViewProps to ScrollView', () => {
29+
const testID = 'test-scroll-view';
30+
const { getByTestId } = render(
31+
<ConditionalScrollView
32+
isScrollEnabled
33+
scrollViewProps={{
34+
testID,
35+
showsVerticalScrollIndicator: false,
36+
bounces: false,
37+
}}
38+
>
39+
{testContent}
40+
</ConditionalScrollView>,
41+
);
42+
43+
const scrollView = getByTestId(testID);
44+
expect(scrollView.props.showsVerticalScrollIndicator).toBe(false);
45+
expect(scrollView.props.bounces).toBe(false);
46+
});
47+
});
48+
49+
describe('when isScrollEnabled is false', () => {
50+
it('renders children without ScrollView wrapper', () => {
51+
const { getByText, queryByTestId } = render(
52+
<ConditionalScrollView
53+
isScrollEnabled={false}
54+
scrollViewProps={{ testID: 'should-not-exist' }}
55+
>
56+
{testContent}
57+
</ConditionalScrollView>,
58+
);
59+
60+
expect(queryByTestId('should-not-exist')).toBeNull();
61+
expect(getByText('Test Content')).toBeDefined();
62+
});
63+
});
64+
65+
describe('dynamic behavior', () => {
66+
it('switches between ScrollView and direct rendering when isScrollEnabled changes', () => {
67+
const result = render(
68+
<ConditionalScrollView
69+
isScrollEnabled
70+
scrollViewProps={{ testID: 'scroll-view' }}
71+
>
72+
{testContent}
73+
</ConditionalScrollView>,
74+
);
75+
76+
expect(result.getByTestId('scroll-view')).toBeDefined();
77+
78+
result.rerender(
79+
<ConditionalScrollView
80+
isScrollEnabled={false}
81+
scrollViewProps={{ testID: 'scroll-view' }}
82+
>
83+
{testContent}
84+
</ConditionalScrollView>,
85+
);
86+
87+
expect(result.queryByTestId('scroll-view')).toBeNull();
88+
89+
result.rerender(
90+
<ConditionalScrollView
91+
isScrollEnabled
92+
scrollViewProps={{ testID: 'scroll-view' }}
93+
>
94+
{testContent}
95+
</ConditionalScrollView>,
96+
);
97+
98+
expect(result.getByTestId('scroll-view')).toBeDefined();
99+
});
100+
});
101+
});
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import React from 'react';
2+
import { ScrollView } from 'react-native';
3+
import { ConditionalScrollViewProps } from './ConditionalScrollView.types';
4+
5+
/**
6+
* ConditionalScrollView renders either a ScrollView or content directly based on isScrollEnabled prop.
7+
* This is useful for homepage redesign where we want to remove nested scroll views in favor of a global scroll container.
8+
*/
9+
const ConditionalScrollView: React.FC<ConditionalScrollViewProps> = ({
10+
children,
11+
isScrollEnabled,
12+
scrollViewProps,
13+
}) =>
14+
isScrollEnabled ? (
15+
<ScrollView {...scrollViewProps}>{children}</ScrollView>
16+
) : (
17+
<>{children}</>
18+
);
19+
20+
export default ConditionalScrollView;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { ScrollViewProps } from 'react-native';
2+
3+
export interface ConditionalScrollViewProps {
4+
/**
5+
* Content to render inside the conditional scroll view
6+
*/
7+
children: React.ReactNode;
8+
/**
9+
* If true, wraps children in ScrollView. If false, renders children directly.
10+
*/
11+
isScrollEnabled: boolean;
12+
/**
13+
* Optional props to pass to ScrollView when isScrollEnabled is true
14+
*/
15+
scrollViewProps?: ScrollViewProps;
16+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './ConditionalScrollView';

0 commit comments

Comments
 (0)