Skip to content

Commit

Permalink
Merge branch 'main' into 8618-reduce-enzyme-usage-in-unit-test-by-25-…
Browse files Browse the repository at this point in the history
…--3-of-3
  • Loading branch information
Daniel-Cross authored Oct 3, 2024
2 parents 6732833 + 201a806 commit 086c679
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
9 changes: 9 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,12 @@ app/components/Views/DetectedTokens @MetaMask/metamask-assets
app/components/Views/NFTAutoDetectionModal @MetaMask/metamask-assets
app/components/Views/NftDetails @MetaMask/metamask-assets
app/reducers/collectibles @MetaMask/metamask-assets

# UX Team
app/components @MetaMask/wallet-ux
app/reducers/experimentalSettings @MetaMask/wallet-ux
app/reducers/modals @MetaMask/wallet-ux
app/reducers/navigation @MetaMask/wallet-ux
app/reducers/onboarding @MetaMask/wallet-ux
app/reducers/privacy @MetaMask/wallet-ux
app/reducers/settings @MetaMask/wallet-ux
3 changes: 2 additions & 1 deletion app/components/UI/AccountRightButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { MetaMetricsEvents } from '../../../core/Analytics';
import { AccountOverviewSelectorsIDs } from '../../../../e2e/selectors/AccountOverview.selectors';
import { useMetrics } from '../../../components/hooks/useMetrics';
import { useNetworkInfo } from '../../../selectors/selectedNetworkController';
import UrlParser from 'url-parse';

const styles = StyleSheet.create({
leftButton: {
Expand Down Expand Up @@ -138,7 +139,7 @@ const AccountRightButton = ({
const currentUrl = route.params?.url;
let hostname;
if (currentUrl) {
hostname = new URL(currentUrl).hostname;
hostname = new UrlParser(currentUrl)?.hostname;
}

const { networkName, networkImageSource } = useNetworkInfo(hostname);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import { ViewPropTypes, TouchableOpacity } from 'react-native';
import { TouchableOpacity, ViewStyle, GestureResponderEvent } from 'react-native';

/**
* @deprecated The `<GenericButton>` component has been deprecated in favor of the new `<Button>` component from the component-library.
Expand All @@ -10,31 +9,32 @@ import { ViewPropTypes, TouchableOpacity } from 'react-native';
* If you would like to help with the replacement of the old `Button` component, please submit a pull request against this GitHub issue:
* {@link https://github.com/MetaMask/metamask-mobile/issues/8107}
*/
const GenericButton = (props) => (
<TouchableOpacity
onPress={props.onPress}
style={props.style}
delayPressIn={50}
>
{props.children}
</TouchableOpacity>
);

GenericButton.propTypes = {
interface GenericButtonProps {
/**
* Children components of the GenericButton
* it can be a text node, an image, or an icon
* or an Array with a combination of them
*/
children: PropTypes.any,
children?: React.ReactNode;
/**
* Styles to be applied to the GenericButton
*/
style: ViewPropTypes.style,
style?: ViewStyle;
/**
* Function to be called on press
*/
onPress: PropTypes.func,
};
onPress?: (event: GestureResponderEvent) => void;
}

const GenericButton: React.FC<GenericButtonProps> = (props) => (
<TouchableOpacity
onPress={props.onPress}
style={props.style}
delayPressIn={50}
>
{props.children}
</TouchableOpacity>
);

export default GenericButton;
4 changes: 2 additions & 2 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ stages:
- run_tag_smoke_assets_android: {}
- run_tag_smoke_confirmations_ios: {}
- run_tag_smoke_confirmations_android: {}
- run_tag_smoke_swaps_ios: {}
- run_tag_smoke_swaps_android: {}
# - run_tag_smoke_swaps_ios: {}
# - run_tag_smoke_swaps_android: {}
- run_tag_smoke_core_ios: {}
- run_tag_smoke_core_android: {}
build_regression_e2e_ios_android_stage:
Expand Down
4 changes: 2 additions & 2 deletions e2e/specs/swaps/swap-action-regression.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import { CustomNetworks } from '../../resources/networks.e2e';
import TestHelpers from '../../helpers';
import FixtureServer from '../../fixtures/fixture-server';
import { getFixturesServerPort } from '../../fixtures/utils';
import { Regression } from '../../tags';
import { SmokeSwaps } from '../../tags';
import Assertions from '../../utils/Assertions';

const fixtureServer = new FixtureServer();

describe(Regression('Multiple Swaps from Actions'), () => {
describe(SmokeSwaps('Multiple Swaps from Actions'), () => {
let swapOnboarded = true; // TODO: Set it to false once we show the onboarding page again.
beforeAll(async () => {
await TestHelpers.reverseServerPort();
Expand Down

0 comments on commit 086c679

Please sign in to comment.