Skip to content

Commit

Permalink
Merge branch 'develop' into longer-network-tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing authored Jul 17, 2023
2 parents 0c5e27a + ea589a6 commit 9095e16
Show file tree
Hide file tree
Showing 301 changed files with 2,936 additions and 1,879 deletions.
4 changes: 4 additions & 0 deletions .iyarc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ GHSA-p8p7-x288-28g6
# Not easily patched
# Minimal risk to us because we're using lockdown which also prevents this case of prototype pollution
GHSA-h755-8qp9-cq85

# tough-cookie
# this will go away soon when we get rid of web3-provider-engine
GHSA-72xf-g2v4-qvf3
25 changes: 19 additions & 6 deletions app/_locales/en/messages.json

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

1 change: 1 addition & 0 deletions app/images/icons/check-bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/images/icons/minus-bold.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 2 additions & 19 deletions app/scripts/controllers/mmi-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,25 +442,8 @@ export default class MMIController extends EventEmitter {
return keyring.getTransactionDeepLink(from, custodyTxId);
}

async getCustodianToken(custodianType) {
let currentCustodyType;

const address = this.preferencesController.getSelectedAddress();

if (!custodianType) {
const resultCustody = this.custodyController.getCustodyTypeByAddress(
toChecksumHexAddress(address),
);
currentCustodyType = resultCustody;
}
let keyring = await this.keyringController.getKeyringsByType(
currentCustodyType || `Custody - ${custodianType}`,
)[0];
if (!keyring) {
keyring = await this.keyringController.addNewKeyring(
currentCustodyType || `Custody - ${custodianType}`,
);
}
async getCustodianToken(address) {
const keyring = await this.keyringController.getKeyringForAccount(address);
const { authDetails } = keyring.getAccountDetails(address);
return keyring ? authDetails.jwt || authDetails.refreshToken : '';
}
Expand Down
3 changes: 0 additions & 3 deletions development/ts-migration-dashboard/files-to-convert.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,9 +1162,6 @@
"ui/hooks/useUserPreferencedCurrency.test.js",
"ui/index.js",
"ui/index.test.js",
"ui/pages/add-nft/add-nft.js",
"ui/pages/add-nft/add-nft.test.js",
"ui/pages/add-nft/index.js",
"ui/pages/asset/asset.js",
"ui/pages/asset/components/asset-breadcrumb.js",
"ui/pages/asset/components/asset-navigation.js",
Expand Down
22 changes: 1 addition & 21 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@
},
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true,
"@metamask/network-controller>@metamask/eth-json-rpc-provider": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"node-fetch": true
Expand All @@ -1642,26 +1642,6 @@
"superstruct": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true,
"@metamask/safe-event-emitter": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-provider": {
"packages": {
"@metamask/safe-event-emitter": true,
Expand Down
22 changes: 1 addition & 21 deletions lavamoat/browserify/desktop/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@
},
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true,
"@metamask/network-controller>@metamask/eth-json-rpc-provider": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"node-fetch": true
Expand All @@ -1768,26 +1768,6 @@
"superstruct": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true,
"@metamask/safe-event-emitter": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-provider": {
"packages": {
"@metamask/safe-event-emitter": true,
Expand Down
22 changes: 1 addition & 21 deletions lavamoat/browserify/flask/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1750,7 +1750,7 @@
},
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true,
"@metamask/network-controller>@metamask/eth-json-rpc-provider": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"node-fetch": true
Expand All @@ -1768,26 +1768,6 @@
"superstruct": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true,
"@metamask/safe-event-emitter": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-provider": {
"packages": {
"@metamask/safe-event-emitter": true,
Expand Down
22 changes: 1 addition & 21 deletions lavamoat/browserify/main/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@
},
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true,
"@metamask/network-controller>@metamask/eth-json-rpc-provider": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"node-fetch": true
Expand All @@ -1642,26 +1642,6 @@
"superstruct": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true,
"@metamask/safe-event-emitter": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-provider": {
"packages": {
"@metamask/safe-event-emitter": true,
Expand Down
22 changes: 1 addition & 21 deletions lavamoat/browserify/mmi/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1852,7 +1852,7 @@
},
"packages": {
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": true,
"@metamask/network-controller>@metamask/eth-json-rpc-provider": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"node-fetch": true
Expand All @@ -1870,26 +1870,6 @@
"superstruct": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-snap-keyring>@metamask/eth-sig-util": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>@metamask/utils": true,
"@metamask/network-controller>@metamask/eth-json-rpc-infura>eth-json-rpc-middleware>pify": true,
"@metamask/safe-event-emitter": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/network-controller>@metamask/eth-json-rpc-provider": {
"packages": {
"@metamask/safe-event-emitter": true,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"@metamask/base-controller": "^3.1.0",
"@metamask/browser-passworder": "^4.1.0",
"@metamask/contract-metadata": "^2.3.1",
"@metamask/controller-utils": "^4.1.0",
"@metamask/controller-utils": "^4.2.0",
"@metamask/design-tokens": "^1.12.0",
"@metamask/desktop": "^0.3.0",
"@metamask/eth-json-rpc-middleware": "^11.0.0",
Expand All @@ -248,7 +248,7 @@
"@metamask/logo": "^3.1.1",
"@metamask/message-manager": "^7.0.2",
"@metamask/metamask-eth-abis": "^3.0.0",
"@metamask/network-controller": "^10.3.0",
"@metamask/network-controller": "^10.3.1",
"@metamask/notification-controller": "^3.0.0",
"@metamask/obs-store": "^8.1.0",
"@metamask/permission-controller": "^4.0.0",
Expand Down
13 changes: 11 additions & 2 deletions test/data/mock-state.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,22 @@
"type": "rpc",
"chainId": "0x5",
"ticker": "ETH",
"id": "testNetworkConfigurationId"
"id": "chain5"
},
"networkConfigurations": {
"testNetworkConfigurationId": {
"rpcUrl": "https://testrpc.com",
"chainId": "0x1",
"nickname": "Custom Mainnet RPC"
"nickname": "Custom Mainnet RPC",
"type": "rpc",
"id": "testNetworkConfigurationId"
},
"chain5": {
"type": "rpc",
"chainId": "0x5",
"ticker": "ETH",
"nickname": "Chain 5",
"id": "chain5"
}
},
"keyrings": [
Expand Down
3 changes: 3 additions & 0 deletions test/e2e/fixture-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ function defaultFixture() {
rpcUrl: 'http://localhost:8545',
ticker: 'ETH',
type: 'rpc',
id: 'networkConfigurationId',
},
networkConfigurations: {
networkConfigurationId: {
Expand Down Expand Up @@ -346,6 +347,7 @@ function onboardingFixture() {
rpcUrl: 'http://localhost:8545',
chainId: CHAIN_IDS.LOCALHOST,
nickname: 'Localhost 8545',
id: 'networkConfigurationId',
},
networkConfigurations: {
networkConfigurationId: {
Expand All @@ -355,6 +357,7 @@ function onboardingFixture() {
rpcUrl: 'http://localhost:8545',
ticker: 'ETH',
networkConfigurationId: 'networkConfigurationId',
type: 'rpc',
},
},
},
Expand Down
Loading

0 comments on commit 9095e16

Please sign in to comment.