Skip to content

Commit

Permalink
Merge branch 'develop' into network-change-ens-resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
NiranjanaBinoy authored Mar 13, 2023
2 parents 2a27b83 + 0fca0e3 commit 0479804
Show file tree
Hide file tree
Showing 34 changed files with 568 additions and 315 deletions.
31 changes: 12 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ workflows:
requires:
- prep-deps
- prep-build-desktop:
filters:
branches:
ignore: master
requires:
- prep-deps
- prep-build-flask:
Expand Down Expand Up @@ -137,6 +140,9 @@ workflows:
requires:
- trigger-beta-build
- validate-source-maps-desktop:
filters:
branches:
ignore: master
requires:
- prep-build-desktop
- validate-source-maps-flask:
Expand All @@ -152,6 +158,9 @@ workflows:
- prep-deps
- trigger-beta-build
- test-mozilla-lint-desktop:
filters:
branches:
ignore: master
requires:
- prep-deps
- prep-build-desktop
Expand Down Expand Up @@ -387,25 +396,9 @@ jobs:
- checkout
- attach_workspace:
at: .
- when:
condition:
not:
matches:
pattern: /^master$/
value: << pipeline.git.branch >>
steps:
- run:
name: build:dist
command: yarn build --build-type desktop dist
- when:
condition:
matches:
pattern: /^master$/
value: << pipeline.git.branch >>
steps:
- run:
name: build:prod
command: yarn build --build-type desktop prod
- run:
name: build:dist
command: yarn build --build-type desktop dist
- run:
name: build:debug
command: find dist/ -type f -exec md5sum {} \; | sort -k 2
Expand Down
2 changes: 2 additions & 0 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ ignores:
- '@storybook/builder-webpack5'
- '@storybook/manager-webpack5'
- 'storybook-dark-mode'
- '@whitespace/storybook-addon-html'
- 'react-syntax-highlighter'
- 'style-loader'
- 'css-loader'
- 'sass-loader'
Expand Down
1 change: 1 addition & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
'@storybook/addon-knobs',
'./i18n-party-addon/register.js',
'storybook-dark-mode',
'@whitespace/storybook-addon-html'
],
staticDirs: ['../app', './images'],
// Uses babel.config.js settings and prevents "Missing class properties transform" error
Expand Down
16 changes: 8 additions & 8 deletions lavamoat/browserify/desktop/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4302,18 +4302,13 @@
"packages": {
"react-markdown>remark-parse>mdast-util-from-markdown>mdast-util-to-string": true,
"react-markdown>remark-parse>mdast-util-from-markdown>micromark": true,
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": true,
"react-markdown>vfile>unist-util-stringify-position": true
"react-markdown>vfile>unist-util-stringify-position": true,
"react-syntax-highlighter>refractor>parse-entities": true
}
},
"react-markdown>remark-parse>mdast-util-from-markdown>micromark": {
"packages": {
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": true
}
},
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": {
"globals": {
"document.createElement": true
"react-syntax-highlighter>refractor>parse-entities": true
}
},
"react-markdown>remark-rehype": {
Expand Down Expand Up @@ -4532,6 +4527,11 @@
"react": true
}
},
"react-syntax-highlighter>refractor>parse-entities": {
"globals": {
"document.createElement": true
}
},
"react-tippy": {
"globals": {
"Element": true,
Expand Down
16 changes: 8 additions & 8 deletions lavamoat/browserify/flask/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -4302,18 +4302,13 @@
"packages": {
"react-markdown>remark-parse>mdast-util-from-markdown>mdast-util-to-string": true,
"react-markdown>remark-parse>mdast-util-from-markdown>micromark": true,
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": true,
"react-markdown>vfile>unist-util-stringify-position": true
"react-markdown>vfile>unist-util-stringify-position": true,
"react-syntax-highlighter>refractor>parse-entities": true
}
},
"react-markdown>remark-parse>mdast-util-from-markdown>micromark": {
"packages": {
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": true
}
},
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": {
"globals": {
"document.createElement": true
"react-syntax-highlighter>refractor>parse-entities": true
}
},
"react-markdown>remark-rehype": {
Expand Down Expand Up @@ -4532,6 +4527,11 @@
"react": true
}
},
"react-syntax-highlighter>refractor>parse-entities": {
"globals": {
"document.createElement": true
}
},
"react-tippy": {
"globals": {
"Element": true,
Expand Down
48 changes: 24 additions & 24 deletions lavamoat/build-system/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -6562,22 +6562,6 @@
"define": true
}
},
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": {
"packages": {
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>character-entities": true,
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>character-entities-legacy": true,
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>character-reference-invalid": true,
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>is-alphanumerical": true,
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>is-hexadecimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true
}
},
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>is-alphanumerical": {
"packages": {
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-alphabetical": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true
}
},
"react-markdown>unified": {
"packages": {
"jsdom>request>extend": true,
Expand Down Expand Up @@ -6620,6 +6604,22 @@
"react-markdown>vfile>unist-util-stringify-position": true
}
},
"react-syntax-highlighter>refractor>parse-entities": {
"packages": {
"react-syntax-highlighter>refractor>parse-entities>character-entities": true,
"react-syntax-highlighter>refractor>parse-entities>character-entities-legacy": true,
"react-syntax-highlighter>refractor>parse-entities>character-reference-invalid": true,
"react-syntax-highlighter>refractor>parse-entities>is-alphanumerical": true,
"react-syntax-highlighter>refractor>parse-entities>is-decimal": true,
"react-syntax-highlighter>refractor>parse-entities>is-hexadecimal": true
}
},
"react-syntax-highlighter>refractor>parse-entities>is-alphanumerical": {
"packages": {
"react-syntax-highlighter>refractor>parse-entities>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-alphabetical": true
}
},
"readable-stream": {
"builtin": {
"events.EventEmitter": true,
Expand Down Expand Up @@ -6964,11 +6964,11 @@
},
"stylelint>@stylelint/postcss-markdown>remark>remark-parse": {
"packages": {
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": true,
"react-syntax-highlighter>refractor>parse-entities": true,
"react-syntax-highlighter>refractor>parse-entities>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>ccount": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>collapse-white-space": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-alphabetical": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-whitespace-character": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-word-character": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>markdown-escapes": true,
Expand All @@ -6995,9 +6995,9 @@
},
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify": {
"packages": {
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities": true,
"react-syntax-highlighter>refractor>parse-entities": true,
"react-syntax-highlighter>refractor>parse-entities>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>ccount": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-whitespace-character": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>markdown-escapes": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>repeat-string": true,
Expand All @@ -7023,10 +7023,10 @@
},
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>stringify-entities": {
"packages": {
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>character-entities-legacy": true,
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>is-alphanumerical": true,
"react-markdown>remark-parse>mdast-util-from-markdown>parse-entities>is-hexadecimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>is-decimal": true,
"react-syntax-highlighter>refractor>parse-entities>character-entities-legacy": true,
"react-syntax-highlighter>refractor>parse-entities>is-alphanumerical": true,
"react-syntax-highlighter>refractor>parse-entities>is-decimal": true,
"react-syntax-highlighter>refractor>parse-entities>is-hexadecimal": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-stringify>stringify-entities>character-entities-html4": true
}
},
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@
"@types/yargs": "^17.0.8",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@whitespace/storybook-addon-html": "^5.1.1",
"addons-linter": "^5.2.0",
"babelify": "^10.0.0",
"bify-module-groups": "^2.0.0",
Expand Down Expand Up @@ -504,6 +505,7 @@
"pumpify": "^2.0.1",
"randomcolor": "^0.5.4",
"react-devtools": "^4.11.0",
"react-syntax-highlighter": "^15.5.0",
"read-installed": "^4.0.3",
"redux-mock-store": "^1.5.4",
"remote-redux-devtools": "^0.5.16",
Expand Down
105 changes: 86 additions & 19 deletions test/e2e/fixture-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const {
} = require('@metamask/snaps-utils');
const { merge } = require('lodash');
const { CHAIN_IDS } = require('../../shared/constants/network');
const { SMART_CONTRACTS } = require('./seeder/smart-contracts');

function defaultFixture() {
return {
Expand Down Expand Up @@ -419,16 +420,6 @@ class FixtureBuilder {
return this;
}

withNftsController(data) {
merge(
this.fixture.data.NftController
? this.fixture.data.NftController
: (this.fixture.data.NftController = {}),
data,
);
return this;
}

withCurrencyController(data) {
merge(this.fixture.data.CurrencyController, data);
return this;
Expand Down Expand Up @@ -495,6 +486,91 @@ class FixtureBuilder {
return this;
}

withNetworkControllerSupportEIP1559() {
merge(this.fixture.data.NetworkController, {
networkDetails: {
EIPS: { 1559: true },
},
});
return this;
}

withNftController(data) {
merge(
this.fixture.data.NftController
? this.fixture.data.NftController
: (this.fixture.data.NftController = {}),
data,
);
return this;
}

withNftControllerERC1155() {
return this.withNftController({
allNftContracts: {
'0x5cfe73b6021e818b776b421b1c4db2474086a7e1': {
1337: [
{
address: `__FIXTURE_SUBSTITUTION__CONTRACT${SMART_CONTRACTS.ERC1155}`,
},
],
},
},
allNfts: {
'0x5cfe73b6021e818b776b421b1c4db2474086a7e1': {
1337: [
{
address: `__FIXTURE_SUBSTITUTION__CONTRACT${SMART_CONTRACTS.ERC1155}`,
tokenId: '1',
favorite: false,
isCurrentlyOwned: true,
name: 'Rocks',
description: 'This is a collection of Rock NFTs.',
image:
'ipfs://bafkreifvhjdf6ve4jfv6qytqtux5nd4nwnelioeiqx5x2ez5yrgrzk7ypi',
standard: 'ERC1155',
},
],
},
},
ignoredNfts: [],
});
}

withNftControllerERC721() {
return this.withNftController({
allNftContracts: {
'0x5cfe73b6021e818b776b421b1c4db2474086a7e1': {
1337: [
{
address: `__FIXTURE_SUBSTITUTION__CONTRACT${SMART_CONTRACTS.NFTS}`,
name: 'TestDappCollectibles',
symbol: 'TDC',
},
],
},
},
allNfts: {
'0x5cfe73b6021e818b776b421b1c4db2474086a7e1': {
1337: [
{
address: `__FIXTURE_SUBSTITUTION__CONTRACT${SMART_CONTRACTS.NFTS}`,
description: 'Test Dapp Collectibles for testing.',
favorite: false,
image:
'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjM1MCIgd2lkdGg9IjM1MCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PHBhdGggaWQ9Ik15UGF0aCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJyZWQiIGQ9Ik0xMCw5MCBROTAsOTAgOTAsNDUgUTkwLDEwIDUwLDEwIFExMCwxMCAxMCw0MCBRMTAsNzAgNDUsNzAgUTcwLDcwIDc1LDUwIiAvPjwvZGVmcz48dGV4dD48dGV4dFBhdGggaHJlZj0iI015UGF0aCI+UXVpY2sgYnJvd24gZm94IGp1bXBzIG92ZXIgdGhlIGxhenkgZG9nLjwvdGV4dFBhdGg+PC90ZXh0Pjwvc3ZnPg==',
isCurrentlyOwned: true,
name: 'Test Dapp Collectibles #1',
standard: 'ERC721',
tokenId: '1',
},
],
},
},
ignoredNfts: [],
});
}

withOnboardingController(data) {
merge(this.fixture.data.OnboardingController, data);
return this;
Expand Down Expand Up @@ -1321,15 +1397,6 @@ class FixtureBuilder {
});
}

withNetworkSupportEIP1559() {
merge(this.fixture.data.NetworkController, {
networkDetails: {
EIPS: { 1559: true },
},
});
return this;
}

build() {
this.fixture.meta = {
version: 74,
Expand Down
Loading

0 comments on commit 0479804

Please sign in to comment.