Skip to content

Commit

Permalink
temp+fix: Update transaction-controller version (#12228)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

This PR aims to update `transaction-controller` to latest version.
The issue with previous version is fixed here:
MetaMask/core#4897

## **Related issues**

Fixes:

## **Manual testing steps**

N/A

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [X] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [X] I've completed the PR template to the best of my ability
- [X] I’ve included tests if applicable
- [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [X] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
runway-github[bot] authored Nov 8, 2024
1 parent 0b5af0d commit 271a116
Show file tree
Hide file tree
Showing 122 changed files with 1,918 additions and 6,561 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/add-team-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:

jobs:
add-team-label:
uses: metamask/github-tools/.github/workflows/add-team-label.yml@18af6e4b56a18230d1792480e249ebc50b324927
uses: metamask/github-tools/.github/workflows/add-team-label.yml@058012b49ff2fbd9649c566ba43b29497f93b21d
permissions:
pull-requests: write
secrets:
TEAM_LABEL_TOKEN: ${{ secrets.TEAM_LABEL_TOKEN }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.RELEASE_LABEL_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ jobs:
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_BRANCH: ${{ github.event.inputs.base-branch }}
run: |
./scripts/create-release-pr.sh ${{ github.event.inputs.previous-version-tag }} ${{ github.event.inputs.semver-version }} ${{ needs.generate-build-version.outputs.build-version }}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,3 @@ docs/assets/termsOfUse.html

# build metadata
android/app/src/main/assets/modules.json

# Google firebase base64 derived configs
**/GoogleService-Info.plist
170 changes: 162 additions & 8 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ android {
applicationId "io.metamask"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionName "7.33.2"
versionCode 1474
versionName "7.35.0"
versionCode 1479
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy 'react-native-camera', 'general'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
4 changes: 1 addition & 3 deletions app/actions/onboarding/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ interface ClearEventsAction {

export type OnboardingActionTypes = SaveEventAction | ClearEventsAction;

export function saveOnboardingEvent(
eventArgs: [IMetaMetricsEvent],
): SaveEventAction {
export function saveOnboardingEvent(eventArgs: [IMetaMetricsEvent]): SaveEventAction {
return {
type: SAVE_EVENT,
event: eventArgs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,8 @@ const CellSelectWithMenuMeta = {
control: { type: 'boolean' },
defaultValue: SAMPLE_CELLSELECT_WITH_BUTTON_PROPS.isDisabled,
},
withAvatar: {
control: { type: 'boolean' },
defaultValue: true,
},
showSecondaryTextIcon: {
control: { type: 'boolean' },
defaultValue: true,
},
onTextClick: {
action: 'clicked',
},
},
};

export default CellSelectWithMenuMeta;

export const CellMultiSelectWithMenu = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ const styleSheet = (params: {
tagLabel: {
marginTop: 4,
},
selectedTag: {
backgroundColor: colors.primary.muted,
},
containerRow: {
flexDirection: 'row',
alignItems: 'flex-start',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native';

// External dependencies.
import { useStyles } from '../../hooks';
import Tag from '../../../component-library/components/Tags/Tag';

// Internal dependencies.
import styleSheet from './CellSelectWithMenu.styles';
Expand Down Expand Up @@ -35,7 +34,6 @@ const CellSelectWithMenu = ({
isSelected = false,
children,
withAvatar = true,
showSecondaryTextIcon = true,
...props
}: CellSelectWithMenuProps) => {
const { styles } = useStyles(styleSheet, { style });
Expand Down Expand Up @@ -79,27 +77,14 @@ const CellSelectWithMenu = ({
>
{secondaryText}
</Text>
{showSecondaryTextIcon && (
<Icon
name={IconName.ArrowDown}
size={IconSize.Xss}
style={styles.arrowStyle}
/>
)}
<Icon
name={IconName.ArrowDown}
size={IconSize.Xss}
style={styles.arrowStyle}
/>
</TouchableOpacity>
</TouchableWithoutFeedback>
)}
{!!tagLabel && (
<Tag
testID={CellModalSelectorsIDs.TAG_LABEL}
label={tagLabel}
style={
isSelected
? [styles.tagLabel, styles.selectedTag]
: styles.tagLabel
}
/>
)}
</View>
{children && <View style={styles.optionalAccessory}>{children}</View>}
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,37 +280,6 @@ exports[`CellSelectWithMenu should render with default settings correctly 1`] =
width={10}
/>
</TouchableOpacity>
<View
style={
{
"backgroundColor": "#ffffff",
"borderColor": "#bbc0c5",
"borderRadius": 10,
"borderWidth": 1,
"height": 24,
"justifyContent": "center",
"marginTop": 4,
"paddingHorizontal": 4,
}
}
testID="celltag-label"
>
<Text
accessibilityRole="text"
style={
{
"color": "#141618",
"fontFamily": "EuclidCircularB-Regular",
"fontSize": 14,
"fontWeight": "400",
"letterSpacing": 0,
"lineHeight": 22,
}
}
>
Imported
</Text>
</View>
</View>
</View>
</View>
Expand All @@ -319,7 +288,7 @@ exports[`CellSelectWithMenu should render with default settings correctly 1`] =
<View
style={
{
"paddingRight": 20,
"paddingHorizontal": 20,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ import Text, {

// Internal dependencies.
import { default as ListItemSelectWithButtonComponent } from './ListItemMultiSelectButton';
import {
BUTTON_TEST_ID,
DEFAULT_LISTITEMMULTISELECT_GAP,
SAMPLE_LISTITEMMULTISELECT_PROPS,
} from './ListItemMultiSelectButton.constants';
import { SAMPLE_LISTITEMMULTISELECT_PROPS } from './ListItemMultiSelectButton.constants';
import { ListItemMultiSelectButtonProps } from './ListItemMultiSelectButton.types';

const ListItemSelectWithButtonMeta = {
Expand All @@ -33,27 +29,6 @@ const ListItemSelectWithButtonMeta = {
control: { type: 'boolean' },
defaultValue: SAMPLE_LISTITEMMULTISELECT_PROPS.isDisabled,
},
showButtonIcon: {
control: { type: 'boolean' },
defaultValue: true,
},
buttonIcon: {
control: { type: 'select' },
options: Object.values(IconName),
defaultValue: IconName.MoreVertical,
},
gap: {
control: { type: 'number' },
defaultValue: DEFAULT_LISTITEMMULTISELECT_GAP,
},
buttonProps: {
control: 'object',
defaultValue: {
textButton: '',
onButtonClick: () => null,
buttonTestId: BUTTON_TEST_ID,
},
},
},
};
export default ListItemSelectWithButtonMeta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const styleSheet = (params: {
paddingTop: 32,
},
buttonIcon: {
paddingRight: 20,
paddingHorizontal: 20,
},
});
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const ListItemMultiSelectButton: React.FC<ListItemMultiSelectButtonProps> = ({
<ButtonIcon
iconName={buttonIcon}
iconColor={IconColor.Default}
testID={buttonProps?.buttonTestId || BUTTON_TEST_ID}
testID={BUTTON_TEST_ID}
onPress={buttonProps?.onButtonClick}
accessibilityRole="button"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ export interface ListItemMultiSelectButtonProps
*/
showButtonIcon?: boolean;

/**
* Optional button props
*/
buttonProps?: {
/**
* Optional button onClick function
Expand All @@ -53,16 +50,6 @@ export interface ListItemMultiSelectButtonProps
* Optional property to show text button
*/
textButton?: string | null;

/**
* Optional property to show button icon
*/
showButtonIcon?: boolean;

/**
* Optional property for button test ID
*/
buttonTestId?: string;
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ exports[`ListItemMultiSelectButton should render correctly with default props 1`
<View
style={
{
"paddingRight": 20,
"paddingHorizontal": 20,
}
}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Third party dependencies.
import React from 'react';
import { render } from '@testing-library/react-native';
import { shallow } from 'enzyme';

// External dependencies.
import AvatarIcon from './AvatarIcon';
Expand All @@ -10,7 +10,7 @@ import { SAMPLE_AVATARICON_PROPS } from './AvatarIcon.constants';

describe('AvatarIcon', () => {
it('should render correctly', () => {
const { toJSON } = render(<AvatarIcon {...SAMPLE_AVATARICON_PROPS} />);
expect(toJSON()).toMatchSnapshot();
const wrapper = shallow(<AvatarIcon {...SAMPLE_AVATARICON_PROPS} />);
expect(wrapper).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`AvatarIcon should render correctly 1`] = `
<View
<AvatarBase
size="32"
style={
{
"alignItems": "center",
"backgroundColor": "#ffffff",
"borderRadius": 16,
"height": 32,
"justifyContent": "center",
"overflow": "hidden",
"width": 32,
}
}
>
<SvgMock
color="#141618"
height={20}
<Icon
color="Default"
name="AddSquare"
style={
{
"height": 20,
"width": 20,
}
}
width={20}
size="20"
/>
</View>
</AvatarBase>
`;
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Third party dependencies.
import React from 'react';
import { render, screen } from '@testing-library/react-native';
import { shallow } from 'enzyme';

// Internal dependencies.
import ButtonLink from './ButtonLink';

describe('ButtonLink', () => {
describe('Link', () => {
it('should render correctly', () => {
render(<ButtonLink onPress={jest.fn()} label="I'm a Link!" />);
expect(screen.toJSON()).toMatchSnapshot();
const wrapper = shallow(
<ButtonLink onPress={jest.fn} label={`I'm a Link!`} />,
);
expect(wrapper).toMatchSnapshot();
});
});
Loading

0 comments on commit 271a116

Please sign in to comment.