Skip to content

Commit

Permalink
Merge branch 'develop' into brody/swaps-e2e-changes-1
Browse files Browse the repository at this point in the history
  • Loading branch information
BrodyHughes authored Sep 6, 2024
2 parents 413d8dc + 182ba51 commit a9b2933
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 35 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/macstadium-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,12 @@ jobs:
with:
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.sha }}
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}-

# Modify env and build app in release mode
- name: Run iOS e2e tests with retry

- name: Modify env and build app in release mode
run: |
sed -i'' -e "s/IS_TESTING=false/IS_TESTING=true/" .env && rm -f .env-e
yarn detox build --configuration ios.sim.release
# Detox iOS e2e tests
- name: Run iOS e2e tests with retry
- name: Detox iOS e2e tests
run: |
./scripts/run-retry-tests.sh 3
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,48 @@ and this project adheres to [Semantic Versioning](http://semver.org/)

### Fixed

## [1.9.37] (https://github.com/rainbow-me/rainbow/releases/tag/v1.9.37)

### Added

- Implement NFTs v2 Arc endpoint (#5973)
- Added mutation and queries needed for spindl integration (#6031)
- Added translations for degen mode and popular in rainbow (#6020)
- Added featured results to the dapp browser trending dapps section on the discover screen (#6046, #6049)
- Implemented perceived finality where a pending transaction is detected and confirmed, we are flagging the affected assets’ addresses and refetching updated user assets balances from BE (#6037)
- Implemented Mobile Wallet Protocol (#6061)
- Added ability to hide collectibles section (#6073)

### Changed

- Use chainId instead of network parts 1 and 2 (#5981, #5997)
- Shortened popular tokens list from 6 to 3 (#6028)
- Removed old logger and cleaned up logging (#6021)
- Added support for navigating to swap settings as a route (#6036)
- Upgraded some packages to the latest version (#6040)
- Cleaned up e2e on Android (#5970)
- Bumped WC and did some refactoring (#6047, #6064)
- Bumped webpack from 5.90.3 to 5.94.0 (#6048)
- Bumped fastlane (#6062)

### Fixed

- Fixed an issue on android where a user couldn’t access dexscreener in the dapp browser (#6003)
- Fixed Dapp Browser webview height on Android devices (#6004)
- Fixed Android button navigation colors (#6005)
- Fixed TokenToBuyList line break in search results when favoriting a token (#6002)
- Fixed a bug where the terminal UI for ETH rewards was missing (#6007)
- Fixed a bug where a user’s favorites wouldn’t migrate after updating app (#6029)
- Fixed an issue where we were not able to build android locally (#6027)
- Fixed a sentry error boundary crash where users would see the oops something went wrong message (#6044)
- Fixed an issue when certain sites won’t load if using the http prefix (#6054)
- Fixed an issue on ERC20 sends that would show contract address instead of recipient address (#6052)
- Fixed some crashes on PFP button, and send flow (#6063)
- Fixed a bug where WC was not confirming transactions (#6074)
- Fixed a bug where attempting to send an ENS caused a crash (#6075)
- Fixed a discrepancy where gas on l2s were showing higher in send flow than in swaps flow (#6076)
- Fixed a wrong ID being used for spindl integration (#6078)

## [1.9.36] (https://github.com/rainbow-me/rainbow/releases/tag/v1.9.36)

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ android {
applicationId "me.rainbow"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 228
versionName "1.9.37"
versionCode 230
versionName "1.9.38"
missingDimensionStrategy 'react-native-camera', 'general'
renderscriptTargetApi 23
renderscriptSupportModeEnabled true
Expand Down
2 changes: 1 addition & 1 deletion e2e/9_swaps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('Swap Sheet Interaction Flow', () => {
it('Should open swaps via wallet screen swap button with 50% inputAmount for inputAsset', async () => {
await device.disableSynchronization();
await tap('swap-button');
await delayTime('long');
await delayTime('very-long');

const swapInput = await fetchElementAttributes('swap-asset-input');

Expand Down
8 changes: 4 additions & 4 deletions ios/Rainbow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@
"$(PROJECT_DIR)",
);
LLVM_LTO = YES;
MARKETING_VERSION = 1.9.37;
MARKETING_VERSION = 1.9.38;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -1900,7 +1900,7 @@
"$(PROJECT_DIR)",
);
LLVM_LTO = YES;
MARKETING_VERSION = 1.9.37;
MARKETING_VERSION = 1.9.38;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -2017,7 +2017,7 @@
"$(PROJECT_DIR)",
);
LLVM_LTO = YES;
MARKETING_VERSION = 1.9.37;
MARKETING_VERSION = 1.9.38;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down Expand Up @@ -2133,7 +2133,7 @@
"$(PROJECT_DIR)",
);
LLVM_LTO = YES;
MARKETING_VERSION = 1.9.37;
MARKETING_VERSION = 1.9.38;
OTHER_CFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
],
},
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|react-native-keyboard-area|imgix-core-js|react-native-payments|@react-native-firebase|@react-native(-community)?|react-native-reanimated)/)',
'node_modules/(?!((jest-)?react-native|react-native-keyboard-area|imgix-core-js|react-native-payments|@react-native-firebase|@react-native(-community)?|react-native-reanimated|react-native-linear-gradient)/)',
],
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths, {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Rainbow",
"version": "1.9.37-1",
"version": "1.9.38-1",
"private": true,
"scripts": {
"setup": "yarn graphql-codegen:install && yarn ds:install && yarn allow-scripts && yarn postinstall && yarn graphql-codegen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as i18n from '@/languages';
import { TokenFamilyHeaderHeight } from './NFTLoadingSkeleton';
import { MINTS, NFTS_ENABLED, useExperimentalFlag } from '@/config';
import { useRemoteConfig } from '@/model/remoteConfig';
import { IS_TEST } from '@/env';
import { useMints } from '@/resources/mints';
import { useAccountSettings } from '@/hooks';
import { GestureHandlerButton } from '@/__swaps__/screens/Swap/components/GestureHandlerButton';
Expand Down Expand Up @@ -66,8 +65,8 @@ export function NFTEmptyState() {
data: { featuredMint },
} = useMints({ walletAddress: accountAddress });

const nftsEnabled = (useExperimentalFlag(NFTS_ENABLED) || nfts_enabled) && !IS_TEST;
const mintsEnabled = (useExperimentalFlag(MINTS) || mints_enabled) && !IS_TEST;
const nftsEnabled = useExperimentalFlag(NFTS_ENABLED) || nfts_enabled;
const mintsEnabled = useExperimentalFlag(MINTS) || mints_enabled;

if (!nftsEnabled) return null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { opacity } from '@/__swaps__/utils/swaps';
import { deviceUtils } from '@/utils';
import { NFTS_ENABLED, useExperimentalFlag } from '@/config';
import { useRemoteConfig } from '@/model/remoteConfig';
import { IS_TEST } from '@/env';

export const TokenFamilyHeaderHeight = 50;

Expand Down Expand Up @@ -49,7 +48,7 @@ const NFTItem = () => {

const NFTLoadingSkeleton = ({ items = 5 }) => {
const { nfts_enabled } = useRemoteConfig();
const nftsEnabled = (useExperimentalFlag(NFTS_ENABLED) || nfts_enabled) && !IS_TEST;
const nftsEnabled = useExperimentalFlag(NFTS_ENABLED) || nfts_enabled;

if (!nftsEnabled) return null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { NftCollectionSortCriterion } from '@/graphql/__generated__/arc';
import useNftSort from '@/hooks/useNFTsSortBy';
import { useRemoteConfig } from '@/model/remoteConfig';
import { NFTS_ENABLED, useExperimentalFlag } from '@/config';
import { IS_TEST } from '@/env';

const TokenFamilyHeaderHeight = 48;

Expand Down Expand Up @@ -34,7 +33,7 @@ const getMenuItemIcon = (value: NftCollectionSortCriterion) => {

const CollectiblesHeader = () => {
const { nfts_enabled } = useRemoteConfig();
const nftsEnabled = (useExperimentalFlag(NFTS_ENABLED) || nfts_enabled) && !IS_TEST;
const nftsEnabled = useExperimentalFlag(NFTS_ENABLED) || nfts_enabled;
const { nftSort, updateNFTSort } = useNftSort();

if (!nftsEnabled) return null;
Expand Down
7 changes: 1 addition & 6 deletions src/components/asset-list/RecyclerAssetList2/WrappedNFT.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import React, { useCallback, useMemo } from 'react';
import {
// @ts-ignore
IS_TESTING,
} from 'react-native-dotenv';
import { UniqueTokenCard } from '../../unique-token';
import { Box, BoxProps } from '@/design-system';
import { UniqueAsset } from '@/entities';
Expand All @@ -11,7 +7,6 @@ import { useNavigation } from '@/navigation';
import Routes from '@/navigation/routesNames';
import { useRemoteConfig } from '@/model/remoteConfig';
import { NFTS_ENABLED, useExperimentalFlag } from '@/config';
import { IS_TEST } from '@/env';

export default React.memo(function WrappedNFT({
onPress,
Expand All @@ -25,7 +20,7 @@ export default React.memo(function WrappedNFT({
externalAddress?: string;
}) {
const { nfts_enabled } = useRemoteConfig();
const nftsEnabled = (useExperimentalFlag(NFTS_ENABLED) || nfts_enabled) && !IS_TEST;
const nftsEnabled = useExperimentalFlag(NFTS_ENABLED) || nfts_enabled;

const assetCollectible = useCollectible(uniqueId, externalAddress);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useLatestCallback, useOpenFamilies } from '@/hooks';
import { ThemeContextProps } from '@/theme';
import { useRemoteConfig } from '@/model/remoteConfig';
import { NFTS_ENABLED, useExperimentalFlag } from '@/config';
import { IS_TEST } from '@/env';

type Props = {
name: string;
Expand All @@ -16,7 +15,7 @@ type Props = {

export default React.memo(function WrappedTokenFamilyHeader({ name, total, image, theme, testID }: Props) {
const { nfts_enabled } = useRemoteConfig();
const nftsEnabled = (useExperimentalFlag(NFTS_ENABLED) || nfts_enabled) && !IS_TEST;
const nftsEnabled = useExperimentalFlag(NFTS_ENABLED) || nfts_enabled;

const { openFamilies, updateOpenFamilies } = useOpenFamilies();
const isFamilyOpen = openFamilies[name];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Dimension, Layout, LayoutManager, LayoutProvider } from 'recyclerlistvi
import ViewDimensions from './ViewDimensions';
import { BaseCellType, CellType } from './ViewTypes';
import { deviceUtils } from '@/utils';
import { getRemoteConfig, RainbowConfig } from '@/model/remoteConfig';
import { NFTS_ENABLED, REMOTE_CARDS, useExperimentalFlag } from '@/config';
import { RainbowConfig } from '@/model/remoteConfig';
import { NFTS_ENABLED, REMOTE_CARDS } from '@/config';
import { useContext } from 'react';
import { RainbowContextType } from '@/helpers/RainbowContext';
import { IS_TEST } from '@/env';
Expand Down Expand Up @@ -50,8 +50,8 @@ const getLayoutProvider = ({
experimentalConfig: ReturnType<typeof useContext<RainbowContextType>>['config'];
remoteConfig: RainbowConfig;
}) => {
const remoteCardsEnabled = (remoteConfig.remote_cards_enabled || experimentalConfig[REMOTE_CARDS]) && !IS_TEST;
const nftsEnabled = (remoteConfig.nfts_enabled || experimentalConfig[NFTS_ENABLED]) && !IS_TEST;
const remoteCardsEnabled = remoteConfig.remote_cards_enabled || experimentalConfig[REMOTE_CARDS];
const nftsEnabled = remoteConfig.nfts_enabled || experimentalConfig[NFTS_ENABLED];

const indicesToOverride = [];
for (let i = 0; i < briefSectionsData.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/config/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const defaultConfig: Record<string, ExperimentalValue> = {
[ETH_REWARDS]: { settings: true, value: false },
[DEGEN_MODE]: { settings: true, value: false },
[FEATURED_RESULTS]: { settings: true, value: false },
[NFTS_ENABLED]: { settings: true, value: false },
[NFTS_ENABLED]: { settings: true, value: !!IS_TEST },
};

const storageKey = 'config';
Expand Down

0 comments on commit a9b2933

Please sign in to comment.