Skip to content

Commit

Permalink
temp+chore: updated in-app review to comply with SDK 14 on Android (#…
Browse files Browse the repository at this point in the history
…10647)

## **Description**

This PR bumps the in-app review package to comply with the updates to 

## **Related issues**

Fixes: #10198 

## **Manual testing steps**

1. Build for Android and see successful submission
2.
3.

## **Screenshots/Recordings**

NA

### **Before**
<img width="1306" alt="Screenshot 2024-08-14 at 3 20 41 PM"
src="https://github.com/user-attachments/assets/8e73151f-835e-4e08-b95e-f2224ec4c27a">

### **After**
<img width="1334" alt="Screenshot 2024-08-14 at 3 43 46 PM"
src="https://github.com/user-attachments/assets/20ff7630-18c0-47bc-af50-50d26fd6b557">

## **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.

---------

Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
  • Loading branch information
runway-github[bot] and metamaskbot authored Aug 19, 2024
1 parent 77bf7c6 commit 1d05e43
Show file tree
Hide file tree
Showing 184 changed files with 8,324 additions and 6,638 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
url-to-cladocument: 'https://metamask.io/cla.html'
# This branch can't have protections, commits are made directly to the specified branch.
branch: 'cla-signatures'
allowlist: 'dependabot[bot],metamaskbot,crowdin-bot,runway-github[bot]'
allowlist: 'dependabot[bot],metamaskbot,crowdin-bot'
allow-organization-members: true
blockchain-storage-flag: false
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,75 @@

## Current Main Branch

## 7.29.0 - Aug 2, 2024
### Added
- [#9578](https://github.com/MetaMask/metamask-mobile/pull/9578): feat: type `renderHookWithProvider` (#9578)
- [#10277](https://github.com/MetaMask/metamask-mobile/pull/10277): feat: New nft details page (#10277)
- [#9469](https://github.com/MetaMask/metamask-mobile/pull/9469): feat: nft + swap metrics (#9469)
- [#10267](https://github.com/MetaMask/metamask-mobile/pull/10267): feat: add utility function to get supported chains from the Security Alerts API (#10267)
- [#10082](https://github.com/MetaMask/metamask-mobile/pull/10082): feat: add origin spam modal (#10082)
- [#9947](https://github.com/MetaMask/metamask-mobile/pull/9947): feat: bump `react-native-aes-crypto` (#9947)
- [#10474](https://github.com/MetaMask/metamask-mobile/pull/10474): feat: add the multchain v1 feature flag (#10474)
- [#10378](https://github.com/MetaMask/metamask-mobile/pull/10378): feat: add copy for new receive flow (#10378)
- [#10350](https://github.com/MetaMask/metamask-mobile/pull/10350): feat: make add-team-label use the reusable workflow (#10350)
- [#9390](https://github.com/MetaMask/metamask-mobile/pull/9390): feat(ramp): add ramp intent (#9390)
- [#10451](https://github.com/MetaMask/metamask-mobile/pull/10451): feat: add notifications' details screen (#10451)
- [#10456](https://github.com/MetaMask/metamask-mobile/pull/10456): feat: add notifications list screen (#10456)
- [#10363](https://github.com/MetaMask/metamask-mobile/pull/10363): feat: add notifications UI components to be used by Views (#10363)

### Changed
- [#10531](https://github.com/MetaMask/metamask-mobile/pull/10531): chore: fix release action (#10531)
- [#10471](https://github.com/MetaMask/metamask-mobile/pull/10471): chore: Typescript type coverage util lib folders (#10471)
- [#10507](https://github.com/MetaMask/metamask-mobile/pull/10507): chore: core related files selectors refactor (#10507)
- [#10508](https://github.com/MetaMask/metamask-mobile/pull/10508): chore: abort on fail smoke e2e pipeline (#10508)
- [#10417](https://github.com/MetaMask/metamask-mobile/pull/10417): chore: Dapp protocol qr code scanning (#10417)
- [#10452](https://github.com/MetaMask/metamask-mobile/pull/10452): chore: fix pod install on linux (#10452)
- [#10408](https://github.com/MetaMask/metamask-mobile/pull/10408): chore: create and use selectors of swaps and ramp directories (#10408)
- [#10397](https://github.com/MetaMask/metamask-mobile/pull/10397): chore: selectors confirmations dir (#10397)
- [#10487](https://github.com/MetaMask/metamask-mobile/pull/10487): test: Disable flakey portfolio test (#10487)
- [#10372](https://github.com/MetaMask/metamask-mobile/pull/10372): chore: refactor async-storage-wrapper to MMKV-wrapper (#10372)
- [#10373](https://github.com/MetaMask/metamask-mobile/pull/10373): chore: Migrate default preference to mmkv (#10373)
- [#10416](https://github.com/MetaMask/metamask-mobile/pull/10416): chore: Cherry-picking commits from main to release/7.28.0 for PR #10387 (#10416)
- [#10389](https://github.com/MetaMask/metamask-mobile/pull/10389): chore: Cherry-picking commits from main to release/7.28.0 for PR #10376 (#10389)
- [#10387](https://github.com/MetaMask/metamask-mobile/pull/10387): test: Add step to close onboarding modals (#10387)
- [#10376](https://github.com/MetaMask/metamask-mobile/pull/10376): test: Update env variables for appium upgrading on bitrise.yml (#10376)
- [#10412](https://github.com/MetaMask/metamask-mobile/pull/10412): chore: Update BNB logos (#10412)
- [#10263](https://github.com/MetaMask/metamask-mobile/pull/10263): chore: upgrade transaction controller to 35.0.0 (#10263)
- [#10450](https://github.com/MetaMask/metamask-mobile/pull/10450): test: add e2e to edit account name (#10450)
- [#10251](https://github.com/MetaMask/metamask-mobile/pull/10251): chore: remove remaining use of Preferences Controller for account information (#10251)
- [#10380](https://github.com/MetaMask/metamask-mobile/pull/10380): test: add e2e for imported account being removed and then reimported (#10380)
- [#10346](https://github.com/MetaMask/metamask-mobile/pull/10346): chore: update SRP copy to remove mention of cloud (#10346)
- [#10491](https://github.com/MetaMask/metamask-mobile/pull/10491): chore(ci): pin action versions for external docker/ actions (#10491)
- [#10462](https://github.com/MetaMask/metamask-mobile/pull/10462): refactor: updated children in bottomsheetheader to be optional (#10462)
- [#9580](https://github.com/MetaMask/metamask-mobile/pull/9580): test(ramp): add `useCryptoCurrencies` tests (#9580)
- [#9582](https://github.com/MetaMask/metamask-mobile/pull/9582): test(ramp): add `useFiatCurrencies` tests (#9582)
- [#9579](https://github.com/MetaMask/metamask-mobile/pull/9579): test(ramp): add `useAnalytics` tests (#9579)
- [#9626](https://github.com/MetaMask/metamask-mobile/pull/9626): test(ramp): add `useInAppBrowser` tests (#9626)
- [#9581](https://github.com/MetaMask/metamask-mobile/pull/9581): test(ramp): add `useFetchRampNetworks` tests (#9581)
- [#9589](https://github.com/MetaMask/metamask-mobile/pull/9589): test(ramp): add `useApplePay` tests (#9589)

### Fixed
- [#9744](https://github.com/MetaMask/metamask-mobile/pull/9744): fix: fix/9350 Use consistent commit hash on Bitrise e2e smoke tests (#9744)
- [#10511](https://github.com/MetaMask/metamask-mobile/pull/10511): fix: crash on reload fix by patch (#10511)
- [#10481](https://github.com/MetaMask/metamask-mobile/pull/10481): fix: Added parse errors to be caught on vault corruption flow (#10481)
- [#10467](https://github.com/MetaMask/metamask-mobile/pull/10467): fix: Audit issue xml parser (#10467)
- [#10463](https://github.com/MetaMask/metamask-mobile/pull/10463): fix: useAddressBalance hook selectors warning (#10463)
- [#10436](https://github.com/MetaMask/metamask-mobile/pull/10436): fix: Fix long press login on samsung devices (#10436)
- [#10477](https://github.com/MetaMask/metamask-mobile/pull/10477): fix: fix error when clicking on asset (#10477)
- [#10458](https://github.com/MetaMask/metamask-mobile/pull/10458): fix: adding new locales for nft-details new page (#10458)
- [#10409](https://github.com/MetaMask/metamask-mobile/pull/10409): fix: add events for nft detection (#10409)
- [#10435](https://github.com/MetaMask/metamask-mobile/pull/10435): fix: update @blockaid/ppom_release package to version 1.5.1 (#10435)
- [#10362](https://github.com/MetaMask/metamask-mobile/pull/10362): fix: transaction cancel speed up modal should disappear after transaction is confirmed (#10362)
- [#10488](https://github.com/MetaMask/metamask-mobile/pull/10488): fix: security and privacy toggle paddings (#10488)
- [#10381](https://github.com/MetaMask/metamask-mobile/pull/10381): fix: check navigator availability before initializing the 'DeeplinkManager' (#10381)
- [#10383](https://github.com/MetaMask/metamask-mobile/pull/10383): fix: race condition issues when doing batch-rpc calls in the DeeplinkProtocolService (#10383)
- [#10365](https://github.com/MetaMask/metamask-mobile/pull/10365): fix: attribution link (#10365)
- [#10303](https://github.com/MetaMask/metamask-mobile/pull/10303): fix: page navigation during QR accounts selection (#10303)
## 7.28.1 - Aug 15, 2024
### Fixed
- [#10637](https://github.com/MetaMask/metamask-mobile/pull/10637): fix: swap button blocked by SwapsController polling issue (#10637)
- [#10654](https://github.com/MetaMask/metamask-mobile/pull/10654): fix: hot fix for ledger account select screen to provide disclaimer copy information. (#10654)

## 7.28.0 - Jul 19, 2024
### Added
- [#10252](https://github.com/MetaMask/metamask-mobile/pull/10252): feat: regression label (#10252)
Expand Down
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
versionCode 1375
versionName "7.28.0"
versionCode 1392
versionName "7.29.0"
testBuildType System.getProperty('testBuildType', 'debug')
missingDimensionStrategy 'react-native-camera', 'general'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ContractBoxBase = ({
<View testID={CONTRACT_BOX_NO_PET_NAME_TEST_ID}>
<Button
variant={ButtonVariants.Link}
labelTextVariant={TextVariant.HeadingMD}
textVariant={TextVariant.HeadingMD}
label={formattedAddress}
onPress={onContractPress}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ const CustomSpendCap = ({
<Button
variant={ButtonVariants.Link}
onPress={handlePress}
labelTextVariant={TextVariant.BodyMD}
textVariant={TextVariant.BodyMD}
label={
isEditDisabled
? strings('contract_allowance.custom_spend_cap.edit')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ exports[`CustomSpendCap should match snapshot 1`] = `
<Text
accessibilityRole="link"
accessible={true}
labelTextVariant="sBodyMD"
onPress={[Function]}
onPressIn={[Function]}
onPressOut={[Function]}
Expand All @@ -102,6 +101,7 @@ exports[`CustomSpendCap should match snapshot 1`] = `
}
}
suppressHighlighting={true}
textVariant="sBodyMD"
>
<Text
accessibilityRole="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import { TouchableOpacityProps } from 'react-native';

// External dependencies.
import { ListItemProps } from '../../components/List/ListItem/ListItem.types';
import { IconName } from '../../components/Icons/Icon';
import { ListItemProps } from '../ListItem/ListItem.types';
import { IconName } from '../../Icons/Icon';
import { GestureResponderEvent } from 'react-native-modal';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react';
import { Provider } from 'react-redux';
import AggregatedPercentage, {
AggregatedPercentageProps,
} from './AggregatedPercentage';
import AggregatedPercentage from './AggregatedPercentage';
import { createStore } from 'redux';
import initialBackgroundState from '../../../../util/test/initial-background-state.json';

Expand All @@ -22,56 +20,44 @@ export default {
title: 'Component Library / AggregatedPercentage',
component: AggregatedPercentage,
decorators: [
(Story: typeof React.Component) => (
(Story) => (
<Provider store={store}>
<Story />
</Provider>
),
],
};

const Template = (args: AggregatedPercentageProps) => (
<AggregatedPercentage {...args} />
);
const Template = (args) => <AggregatedPercentage {...args} />;

export const Default = Template.bind(
{},
{
ethFiat: 1000,
tokenFiat: 500,
tokenFiat1dAgo: 950,
ethFiat1dAgo: 450,
},
);
export const Default = Template.bind({});
Default.args = {
ethFiat: 1000,
tokenFiat: 500,
tokenFiat1dAgo: 950,
ethFiat1dAgo: 450,
};

export const NegativePercentageChange: (
args: AggregatedPercentageProps,
) => void = Template.bind(
{},
{
ethFiat: 900,
tokenFiat: 400,
tokenFiat1dAgo: 950,
ethFiat1dAgo: 1000,
},
);
export const NegativePercentageChange = Template.bind({});
NegativePercentageChange.args = {
ethFiat: 900,
tokenFiat: 400,
tokenFiat1dAgo: 950,
ethFiat1dAgo: 1000,
};

export const PositivePercentageChange = Template.bind(
{},
{
ethFiat: 1100,
tokenFiat: 600,
tokenFiat1dAgo: 500,
ethFiat1dAgo: 1000,
},
);
export const PositivePercentageChange = Template.bind({});
PositivePercentageChange.args = {
ethFiat: 1100,
tokenFiat: 600,
tokenFiat1dAgo: 500,
ethFiat1dAgo: 1000,
};

export const MixedPercentageChange = Template.bind(
{},
{
ethFiat: 1050,
tokenFiat: 450,
tokenFiat1dAgo: 500,
ethFiat1dAgo: 1000,
},
);
export const MixedPercentageChange = Template.bind({});
MixedPercentageChange.args = {
ethFiat: 1050,
tokenFiat: 450,
tokenFiat1dAgo: 500,
ethFiat1dAgo: 1000,
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ import { selectCurrentCurrency } from '../../../../selectors/currencyRateControl
import styleSheet from './AggregatedPercentage.styles';
import { useStyles } from '../../../hooks';

export interface AggregatedPercentageProps {
ethFiat: number;
tokenFiat: number;
tokenFiat1dAgo: number;
ethFiat1dAgo: number;
}

const isValidAmount = (amount: number | null | undefined): boolean =>
amount !== null && amount !== undefined && !Number.isNaN(amount);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,37 @@ export default {
title: 'Component Library / PercentageChange',
component: PercentageChange,
decorators: [
(Story: typeof React.Component) => (
(Story) => (
<Provider store={store}>
<Story />
</Provider>
),
],
};

const Template = (args: { value: number | null | undefined }) => (
<PercentageChange {...args} />
);
const Template = (args) => <PercentageChange {...args} />;

export const Default = Template.bind(
{},
{
value: 0,
},
);
export const Default = Template.bind({});
Default.args = {
value: 0,
};

export const PositiveChange = Template.bind(
{},
{
value: 5.5,
},
);
export const PositiveChange = Template.bind({});
PositiveChange.args = {
value: 5.5,
};

export const NegativeChange = Template.bind(
{},
{
value: -3.75,
},
);
export const NegativeChange = Template.bind({});
NegativeChange.args = {
value: -3.75,
};

export const NoChange = Template.bind(
{},
{
value: 0,
},
);
export const NoChange = Template.bind({});
NoChange.args = {
value: 0,
};

export const InvalidValue = Template.bind(
{},
{
value: null,
},
);
export const InvalidValue = Template.bind({});
InvalidValue.args = {
value: null,
};
18 changes: 12 additions & 6 deletions app/component-library/components/Avatars/Avatar/Avatar.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,18 @@ export enum AvatarVariant {
/**
* Avatar component props.
*/
export type AvatarProps =
| (AvatarAccountProps & { variant: AvatarVariant.Account })
| (AvatarFaviconProps & { variant: AvatarVariant.Favicon })
| (AvatarIconProps & { variant: AvatarVariant.Icon })
| (AvatarNetworkProps & { variant: AvatarVariant.Network })
| (AvatarTokenProps & { variant: AvatarVariant.Token });
export type AvatarProps = (
| AvatarAccountProps
| AvatarFaviconProps
| AvatarIconProps
| AvatarNetworkProps
| AvatarTokenProps
) & {
/**
* Variant of Avatar
*/
variant: AvatarVariant;
};

/**
* Mapping of IconSize by AvatarSize.
Expand Down
3 changes: 1 addition & 2 deletions app/component-library/components/Badges/Badge/Badge.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { shallow } from 'enzyme';
import { BadgeVariant } from './Badge.types';
import { SAMPLE_BADGENETWORK_PROPS } from './variants/BadgeNetwork/BadgeNetwork.constants';
import { SAMPLE_BADGESTATUS_PROPS } from './variants/BadgeStatus/BadgeStatus.constants';
import { SAMPLE_BADGENOTIFICATIONS_PROPS } from './variants/BadgeNotifications/BadgeNotifications.constants';

// Internal dependencies.
import Badge from './Badge';
Expand Down Expand Up @@ -42,7 +41,7 @@ describe('Badge', () => {
it('should render badge notifications given the badge notification variant', () => {
const wrapper = shallow(
<Badge
{...SAMPLE_BADGENOTIFICATIONS_PROPS}
{...SAMPLE_BADGESTATUS_PROPS}
variant={BadgeVariant.NotificationsKinds}
/>,
);
Expand Down
Loading

0 comments on commit 1d05e43

Please sign in to comment.