Skip to content

Commit

Permalink
Merge branch 'main' into fix-engine-types
Browse files Browse the repository at this point in the history
  • Loading branch information
Gudahtt authored May 8, 2024
2 parents a391838 + 840bf38 commit 6e9a445
Show file tree
Hide file tree
Showing 85 changed files with 1,893 additions and 973 deletions.
1 change: 0 additions & 1 deletion .bundle/config
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
2 changes: 1 addition & 1 deletion .detoxrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module.exports = {
'android.emulator': {
type: 'android.emulator',
device: {
avdName: 'Pixel_5_API_30',
avdName: 'Pixel_5_Pro_API_30',
},
},
},
Expand Down
156 changes: 78 additions & 78 deletions .storybook/storybook.requires.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '>= 3.0.0'
# Recommended to use http://rbenv.org/ to install and use this version
ruby '>= 3.1.4'

# Allow minor version updates up to but excluding 2.0.0
gem 'cocoapods', '~> 1.12'

# Allow all version updates up to but excluding 7.1.0
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
46 changes: 26 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.6)
CFPropertyList (3.0.7)
base64
nkf
rexml
activesupport (7.0.7.2)
activesupport (7.0.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.4)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
base64 (0.2.0)
claide (1.1.0)
cocoapods (1.12.0)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.12.0)
cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.6.0, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
Expand All @@ -32,8 +35,8 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.21.0, < 2.0)
cocoapods-core (1.12.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -44,7 +47,7 @@ GEM
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand All @@ -53,31 +56,32 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.2.2)
concurrent-ruby (1.2.3)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
ffi (1.15.5)
ffi (1.16.3)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.14.1)
i18n (1.14.4)
concurrent-ruby (~> 1.0)
json (2.5.1)
minitest (5.20.0)
json (2.7.2)
minitest (5.22.3)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
nkf (0.2.0)
public_suffix (4.0.7)
rexml (3.2.5)
rexml (3.2.6)
ruby-macho (2.5.1)
typhoeus (1.4.0)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.22.0)
xcodeproj (1.24.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
Expand All @@ -87,13 +91,15 @@ GEM

PLATFORMS
arm64-darwin-22
ruby
x86_64-linux

DEPENDENCIES
cocoapods (>= 1.11.3)
activesupport (>= 6.1.7.3, < 7.1.0)
cocoapods (~> 1.12)

RUBY VERSION
ruby 3.0.0p0
ruby 3.1.4p223

BUNDLED WITH
2.2.3
2.5.8
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ dependencies {
} else {
implementation jscFlavor
}
androidTestImplementation('com.wix:detox:+') {
androidTestImplementation('com.wix:detox-legacy:+') {
exclude module: "protobuf-lite"
}
androidTestImplementation ('androidx.test.espresso:espresso-contrib:3.4.0')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ImageSourcePropType, Platform } from 'react-native';

// External dependencies.
import { AvatarSize } from '../../Avatar.types';
import { BrowserViewSelectorsIDs } from '../../../../../../../e2e/selectors/BrowserView.selectors';
import { BrowserViewSelectorsIDs } from '../../../../../../../e2e/selectors/Browser/BrowserView.selectors';
import generateTestId from '../../../../../../../wdio/utils/generateTestId';

// Internal dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ import { FlatListProps } from 'react-native';
// External dependencies.
import { Account, UseAccounts } from '../../hooks/useAccounts';

export interface SelectedAccount {
address: string;
lastUsed?: number;
}

export type SelectedAccountByAddress = Record<string, SelectedAccount>;

/**
* AccountSelectorList props.
*/
Expand Down
2 changes: 1 addition & 1 deletion app/components/UI/BrowserUrlBar/BrowserUrlBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Text from '../../../component-library/components/Texts/Text';

import { BrowserUrlBarProps } from './BrowserUrlBar.types';
import stylesheet from './BrowserUrlBar.styles';
import { BrowserViewSelectorsIDs } from '../../../../e2e/selectors/BrowserView.selectors';
import { BrowserViewSelectorsIDs } from '../../../../e2e/selectors/Browser/BrowserView.selectors';
import Url from 'url-parse';
import { regex } from '../../../../app/util/regex';

Expand Down
54 changes: 51 additions & 3 deletions app/components/UI/Name/Name.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,45 @@ import { default as NameComponent } from './Name';
import { NameProperties, NameType } from './Name.types';

const backdropStyle = { backgroundColor: 'white', padding: 50 };
const ADDRESS_1 = '0x2990079bcdEe240329a520d2444386FC119da21a';
const UNKNOWN_ADDRESS = '0x2990079bcdEe240329a520d2444386FC119da21a';
const METAMASK_MAINNET_BRIDGE_ADDRESS =
'0x0439e60F02a8900a951603950d8D4527f400C3f1';
const NFT_ADDRESS = '0x12345643338A158DeC2FbF411B71aeB188743';
const SELECTED_CHAIN_ID = '0x1';
const SELECTED_ACCOUNT = '0x72b1FDb6443338A158DeC2FbF411B71aeB157A42';

type Story = StoryObj<NameProperties>;

const storeMock = configureStore({
reducer: (state) => state,
preloadedState: {
settings: { useBlockieIcon: false },
engine: {
backgroundState: {
NetworkController: {
providerConfig: {
chainId: SELECTED_CHAIN_ID,
},
},
PreferencesController: {
selectedAddress: SELECTED_ACCOUNT,
},
NftController: {
allNfts: {},
allNftContracts: {
[SELECTED_ACCOUNT]: {
[SELECTED_CHAIN_ID]: [
{
address: NFT_ADDRESS,
name: 'MyToken',
symbol: 'MTK',
},
],
},
},
},
},
},
},
});

Expand All @@ -32,14 +63,31 @@ const meta: Meta<typeof NameComponent> = {
export default meta;

export const UnknownAddress: Story = {
args: { type: NameType.EthereumAddress, value: ADDRESS_1 },
args: { type: NameType.EthereumAddress, value: UNKNOWN_ADDRESS },
};

export const RecognizedFirstPartyContract: Story = {
args: {
type: NameType.EthereumAddress,
value: METAMASK_MAINNET_BRIDGE_ADDRESS,
},
};

export const RecognizedNFT: Story = {
args: {
type: NameType.EthereumAddress,
value: NFT_ADDRESS,
},
};

export const NarrowWidth: Story = {
render() {
return (
<View style={backdropStyle}>
<NameComponent type={NameType.EthereumAddress} value={ADDRESS_1} />
<NameComponent
type={NameType.EthereumAddress}
value={UNKNOWN_ADDRESS}
/>
</View>
);
},
Expand Down
Loading

0 comments on commit 6e9a445

Please sign in to comment.