Skip to content

Commit

Permalink
Merge branch 'develop' into token-approval-promise-refactor-full
Browse files Browse the repository at this point in the history
  • Loading branch information
bergarces committed Jun 2, 2023
2 parents d405b0f + f1de905 commit 243fa62
Show file tree
Hide file tree
Showing 227 changed files with 3,779 additions and 7,399 deletions.
1 change: 0 additions & 1 deletion .metamaskrc.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ INFURA_PROJECT_ID=00000000000
;SWAPS_USE_DEV_APIS=
;PORTFOLIO_URL=
;TRANSACTION_SECURITY_PROVIDER=
;MULTICHAIN=

; Set this to test changes to the phishing warning page.
;PHISHING_WARNING_PAGE_URL=
168 changes: 76 additions & 92 deletions .storybook/test-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,81 +16,6 @@ const state = {
protocol: 'https:',
url: 'https://metamask.github.io/test-dapp/',
},
networkList: [
{
blockExplorerUrl: 'https://etherscan.io',
chainId: '0x1',
iconColor: 'var(--mainnet)',
isATestNetwork: false,
labelKey: 'mainnet',
providerType: 'mainnet',
rpcUrl: 'https://mainnet.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://goerli.etherscan.io',
chainId: '0x5',
iconColor: 'var(--color-network-goerli-default)',
isATestNetwork: true,
labelKey: 'goerli',
providerType: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://sepolia.etherscan.io',
chainId: '0xaa36a7',
iconColor: 'var(--color-network-sepolia-default)',
isATestNetwork: true,
labelKey: 'sepolia',
providerType: 'sepolia',
rpcUrl: 'https://sepolia.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: '',
chainId: '0x539',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: true,
label: 'Localhost 8545',
providerType: 'rpc',
rpcUrl: 'http://localhost:8545',
ticker: 'ETH',
},
{
blockExplorerUrl: 'https://bscscan.com',
chainId: '0x38',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Binance Smart Chain',
providerType: 'rpc',
rpcUrl: 'https://bsc-dataseed.binance.org/',
ticker: 'BNB',
},
{
blockExplorerUrl: 'https://cchain.explorer.avax.network/',
chainId: '0xa86a',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Avalanche',
providerType: 'rpc',
rpcUrl: 'https://api.avax.network/ext/bc/C/rpc',
ticker: 'AVAX',
},
{
blockExplorerUrl: 'https://polygonscan.com',
chainId: '0x89',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Polygon',
providerType: 'rpc',
rpcUrl: 'https://polygon-rpc.com',
ticker: 'MATIC',
},
],
metamask: {
tokenList: {
'0x514910771af9ca656af840dff83e8264ecf986ca': {
Expand Down Expand Up @@ -1424,23 +1349,6 @@ const state = {
},
},
},
swapsState: {
quotes: {},
fetchParams: null,
tokens: null,
tradeTxId: null,
approveTxId: null,
quotesLastFetched: null,
customMaxGas: '',
customGasPrice: null,
selectedAggId: null,
customApproveTxData: '',
errorKey: '',
topAggId: null,
routeState: '',
swapsFeatureIsLive: false,
swapsQuoteRefreshTime: 60000,
},
ensResolutionsByAddress: {},
pendingApprovals: {},
pendingApprovalCount: 0,
Expand Down Expand Up @@ -1691,4 +1599,80 @@ const state = {
},
};

export const networkList = [
{
blockExplorerUrl: 'https://etherscan.io',
chainId: '0x1',
iconColor: 'var(--mainnet)',
isATestNetwork: false,
labelKey: 'mainnet',
providerType: 'mainnet',
rpcUrl: 'https://mainnet.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://goerli.etherscan.io',
chainId: '0x5',
iconColor: 'var(--color-network-goerli-default)',
isATestNetwork: true,
labelKey: 'goerli',
providerType: 'goerli',
rpcUrl: 'https://goerli.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: 'https://sepolia.etherscan.io',
chainId: '0xaa36a7',
iconColor: 'var(--color-network-sepolia-default)',
isATestNetwork: true,
labelKey: 'sepolia',
providerType: 'sepolia',
rpcUrl: 'https://sepolia.infura.io/v3/',
ticker: 'ETH',
viewOnly: true,
},
{
blockExplorerUrl: '',
chainId: '0x539',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: true,
label: 'Localhost 8545',
providerType: 'rpc',
rpcUrl: 'http://localhost:8545',
ticker: 'ETH',
},
{
blockExplorerUrl: 'https://bscscan.com',
chainId: '0x38',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Binance Smart Chain',
providerType: 'rpc',
rpcUrl: 'https://bsc-dataseed.binance.org/',
ticker: 'BNB',
},
{
blockExplorerUrl: 'https://cchain.explorer.avax.network/',
chainId: '0xa86a',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Avalanche',
providerType: 'rpc',
rpcUrl: 'https://api.avax.network/ext/bc/C/rpc',
ticker: 'AVAX',
},
{
blockExplorerUrl: 'https://polygonscan.com',
chainId: '0x89',
iconColor: 'var(--color-network-localhost-default)',
isATestNetwork: false,
label: 'Polygon',
providerType: 'rpc',
rpcUrl: 'https://polygon-rpc.com',
ticker: 'MATIC',
},
]

export default state;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/dist/SignatureController.js b/dist/SignatureController.js
index 59dc5974218e8d073b65969154f35ada3fd9e8ab..5b16d09dcacf49caa15d11c9db7c34569eb36412 100644
--- a/dist/SignatureController.js
+++ b/dist/SignatureController.js
@@ -302,9 +302,9 @@ _SignatureController_keyringController = new WeakMap(), _SignatureController_isE
const messageId = msgParams.metamaskId;
try {
const cleanMessageParams = yield messageManager.approveMessage(msgParams);
+ __classPrivateFieldGet(this, _SignatureController_instances, "m", _SignatureController_acceptApproval).call(this, messageId);
const signature = yield getSignature(cleanMessageParams);
messageManager.setMessageStatusSigned(messageId, signature);
- __classPrivateFieldGet(this, _SignatureController_instances, "m", _SignatureController_acceptApproval).call(this, messageId);
return __classPrivateFieldGet(this, _SignatureController_getAllState, "f").call(this);
}
catch (error) {
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/dist/squirrelly.cjs.js b/dist/squirrelly.cjs.js
index 4680ee747900853b9af01b480c749880dedb9824..95dce7623bc115508063a78c7de9ed7b6e4d3d82 100644
index b87580be5da8a9a5af4cf60c8c5acf910c8f9ed2..e037b8a986d331f7075bbd448c80104de8a3453c 100644
--- a/dist/squirrelly.cjs.js
+++ b/dist/squirrelly.cjs.js
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To learn how to contribute to the MetaMask project itself, visit our [Internal D
- Install [Yarn v3](https://yarnpkg.com/getting-started/install)
- ONLY follow the steps in the "Install Corepack" and "Updating the global Yarn version" sections
- DO NOT take any of the steps in the "Initializing your project", "Updating to the latest versions" or "Installing the latest build fresh from master" sections. These steps could result in your repo being reset or installing the wrong yarn version, which can break your build.
- Copy the `.metamaskrc.dist` file to `.metamaskrc`
- Duplicate `.metamaskrc.dist` within the root and rename it to `.metamaskrc`
- Replace the `INFURA_PROJECT_ID` value with your own personal [Infura Project ID](https://infura.io/docs).
- If debugging MetaMetrics, you'll need to add a value for `SEGMENT_WRITE_KEY` [Segment write key](https://segment.com/docs/connections/find-writekey/), see [Developing on MetaMask - Segment](./development/README.md#segment).
- If debugging unhandled exceptions, you'll need to add a value for `SENTRY_DSN` [Sentry Dsn](https://docs.sentry.io/product/sentry-basics/dsn-explainer/), see [Developing on MetaMask - Sentry](./development/README.md#sentry).
Expand Down
10 changes: 0 additions & 10 deletions app/_locales/am/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions app/_locales/ar/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions app/_locales/bg/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions app/_locales/bn/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions app/_locales/ca/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 243fa62

Please sign in to comment.