From 3db2064efa9e6fa5ffae5c23ce172c8446f54364 Mon Sep 17 00:00:00 2001 From: Daniel <80175477+dan437@users.noreply.github.com> Date: Mon, 27 Jan 2025 16:37:00 +0100 Subject: [PATCH 1/4] feat: Update RPC URL check for smart transactions on BNB chain (#29922) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Updates RPC URL check for smart transactions on BNB chain. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29922?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Get the branch and run `yarn dist` 2. In the `/builds` folder you will see a .zip file with the extension after its done 3. Install it in Google Chrome 4. When smart transactions are turned on (by default) and you submit a Send or Swap transaction on the BNB chain, it will be submitted as a smart transaction ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- shared/modules/selectors/index.test.ts | 25 +++++++++++++++++-- .../modules/selectors/smart-transactions.ts | 14 ++++++----- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/shared/modules/selectors/index.test.ts b/shared/modules/selectors/index.test.ts index 5429bd0166a5..2cda32a6d099 100644 --- a/shared/modules/selectors/index.test.ts +++ b/shared/modules/selectors/index.test.ts @@ -220,14 +220,35 @@ describe('Selectors', () => { ); jestIt( - 'returns false if feature flag is enabled, not a HW and is BSC network', + 'returns true if feature flag is enabled, not a HW and is BSC network with a default RPC URL', () => { const state = createSwapsMockStore(); const newState = { ...state, metamask: { ...state.metamask, - ...mockNetworkState({ chainId: CHAIN_IDS.BSC }), + ...mockNetworkState({ + chainId: CHAIN_IDS.BSC, + rpcUrl: 'https://bsc-dataseed.binance.org/', + }), + }, + }; + expect(getSmartTransactionsEnabled(newState)).toBe(true); + }, + ); + + jestIt( + 'returns false if feature flag is enabled, not a HW and is BSC network with a non-default RPC URL', + () => { + const state = createSwapsMockStore(); + const newState = { + ...state, + metamask: { + ...state.metamask, + ...mockNetworkState({ + chainId: CHAIN_IDS.BSC, + rpcUrl: 'https://bsc-dataseed1.defibit.io/', + }), }, }; expect(getSmartTransactionsEnabled(newState)).toBe(false); diff --git a/shared/modules/selectors/smart-transactions.ts b/shared/modules/selectors/smart-transactions.ts index f3f7bb922711..b78e11b1edda 100644 --- a/shared/modules/selectors/smart-transactions.ts +++ b/shared/modules/selectors/smart-transactions.ts @@ -137,17 +137,19 @@ export const getCurrentChainSupportsSmartTransactions = ( const getIsAllowedRpcUrlForSmartTransactions = (state: NetworkState) => { const chainId = getCurrentChainId(state); + // Allow in non-production or if chain ID is on skip list. if (!isProduction() || SKIP_STX_RPC_URL_CHECK_CHAIN_IDS.includes(chainId)) { - // Allow any STX RPC URL in development and testing environments or for specific chain IDs. return true; } - const currentNetwork = getCurrentNetwork(state); - if (!currentNetwork?.rpcUrl) { + const rpcUrl = getCurrentNetwork(state)?.rpcUrl; + if (!rpcUrl) { return false; } - const rpcUrl = new URL(currentNetwork.rpcUrl); - // Only allow STX in prod if an Infura RPC URL is being used. - return rpcUrl?.hostname?.endsWith('.infura.io'); + const { hostname } = new URL(rpcUrl); + if (!hostname) { + return false; + } + return hostname.endsWith('.infura.io') || hostname.endsWith('.binance.org'); }; export const getSmartTransactionsEnabled = ( From 735e43f179c7bd76c10b2e26e7d2c83a4ee7bb73 Mon Sep 17 00:00:00 2001 From: infiniteflower <139582705+infiniteflower@users.noreply.github.com> Date: Tue, 28 Jan 2025 01:16:51 +0900 Subject: [PATCH 2/4] fix: don't reject valid bridge statuses of failed with empty token obj (#29901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29901?quickstart=1) This PR fixes a case where a valid Bridge status API response of a Failed tx was being rejected by the response validators. Since these Failed responses were being rejected, the client will continue to poll since it still thinks the tx is Pending. ## **Related issues** Fixes: ## **Manual testing steps** It's not that easy to trigger a Failed status from the Bridge API. Instead you can run the tests and confirm that they pass given the data object from this example url: https://bridge.dev-api.cx.metamask.io/getTxStatus?bridgeId=lifi&srcTxHash=0x0473533d91fff15fa47fbef663c632b531612e2ad0ef92c65005051f715f7425&bridge=across&srcChainId=42161&destChainId=10&refuel=false&requestId=141abf51-de4c-4017-855a-1aad583e5352 The updated validators should pass. `yarn jest app/scripts/controllers/bridge-status/validators.test.ts` ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --- .../controllers/bridge-status/validators.test.ts | 15 +++++++++++++++ .../controllers/bridge-status/validators.ts | 4 +++- shared/types/bridge-status.ts | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/scripts/controllers/bridge-status/validators.test.ts b/app/scripts/controllers/bridge-status/validators.test.ts index 83877b80bdb5..c294121dc6bf 100644 --- a/app/scripts/controllers/bridge-status/validators.test.ts +++ b/app/scripts/controllers/bridge-status/validators.test.ts @@ -204,6 +204,16 @@ const BridgeTxStatusResponses = { isExpectedToken: true, bridge: 'across', }, + STATUS_FAILED_VALID: { + status: 'FAILED', + bridge: 'across', + srcChain: { + chainId: 42161, + txHash: + '0x4c57876fad21fb5149af5a58a4aba2ca9d6b212014505dd733b75667ca4f0f2b', + token: {}, + }, + }, }; describe('validators', () => { @@ -250,6 +260,11 @@ describe('validators', () => { expected: true, description: 'complete bridge status with missing fields', }, + { + input: BridgeTxStatusResponses.STATUS_FAILED_VALID, + expected: true, + description: 'valid failed bridge status', + }, { input: undefined, expected: false, diff --git a/app/scripts/controllers/bridge-status/validators.ts b/app/scripts/controllers/bridge-status/validators.ts index b942317a3119..f2948281057f 100644 --- a/app/scripts/controllers/bridge-status/validators.ts +++ b/app/scripts/controllers/bridge-status/validators.ts @@ -87,7 +87,9 @@ const srcChainStatusValidators = [ property: 'token', type: 'object|undefined', validator: (v: unknown): v is object | undefined => - v === undefined || assetValidator(v), + v === undefined || + (v && typeof v === 'object' && Object.keys(v).length === 0) || + assetValidator(v), }, ]; diff --git a/shared/types/bridge-status.ts b/shared/types/bridge-status.ts index bd892eac82dc..d82a5bdd93e7 100644 --- a/shared/types/bridge-status.ts +++ b/shared/types/bridge-status.ts @@ -48,7 +48,7 @@ export type SrcChainStatus = { chainId: ChainId; txHash?: string; // might be undefined if this is a smart transaction (STX) amount?: string; - token?: Asset; + token?: Record | Asset; }; export type DestChainStatus = { From 56ec93dbe20f9a08310bad0393b7b80acf222bf0 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Mon, 27 Jan 2025 19:07:40 +0100 Subject: [PATCH 3/4] chore: Bump Snaps packages (#29920) ## **Description** Bump Snaps packages and handle any required changes. Summary of Snaps changes: - Add support for onAssetsLookup and onAssetsConversion handlers + the `endowment:assets` permission - Add `Intl` as a default global - Add `Skeleton` component - Add border radius prop to `Image` [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29920?quickstart=1) ## **Related issues** Closes https://github.com/MetaMask/snaps/issues/3027 Closes https://github.com/MetaMask/snaps/issues/2940 --------- Co-authored-by: David Drazic --- app/_locales/en/messages.json | 8 +++ builds.yml | 8 +-- lavamoat/browserify/beta/policy.json | 1 + lavamoat/browserify/flask/policy.json | 1 + lavamoat/browserify/main/policy.json | 1 + lavamoat/browserify/mmi/policy.json | 1 + package.json | 12 ++-- shared/constants/permissions.ts | 1 + shared/constants/snaps/permissions.ts | 1 + test/e2e/snaps/enums.js | 2 +- .../safe-component-list.js | 2 + .../app/snaps/snap-ui-image/snap-ui-image.tsx | 4 +- .../snap-ui-renderer/components/image.ts | 17 +++++ .../snap-ui-renderer/components/index.ts | 2 + .../snap-ui-renderer/components/skeleton.ts | 21 ++++++ .../app/snaps/snap-ui-renderer/utils.ts | 25 ++++++- ui/helpers/utils/permission.js | 8 +++ yarn.lock | 68 +++++++++---------- 18 files changed, 136 insertions(+), 47 deletions(-) create mode 100644 ui/components/app/snaps/snap-ui-renderer/components/skeleton.ts diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 32f993334570..243eebb53af2 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -4060,6 +4060,14 @@ "message": "Allow the website or snap to interact with $1.", "description": "The description for the `wallet_snap_*` permission. $1 is the name of the Snap." }, + "permission_assets": { + "message": "Display account assets in MetaMask.", + "description": "The description for the `endowment:name-assets` permission." + }, + "permission_assetsDescription": { + "message": "Allow $1 to provide asset information to the MetaMask client. The assets can be onchain or offchain.", + "description": "An extended description for the `endowment:assets` permission. $1 is the name of the Snap." + }, "permission_cronjob": { "message": "Schedule and execute periodic actions.", "description": "The description for the `snap_cronjob` permission" diff --git a/builds.yml b/builds.yml index 43a093fd2ffd..eda6af0c2840 100644 --- a/builds.yml +++ b/builds.yml @@ -27,7 +27,7 @@ buildTypes: - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - REJECT_INVALID_SNAPS_PLATFORM_VERSION: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.12.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.13.0/index.html - ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management # Main build uses the default browser manifest manifestOverrides: false @@ -48,7 +48,7 @@ buildTypes: - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - REJECT_INVALID_SNAPS_PLATFORM_VERSION: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.12.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.13.0/index.html - ACCOUNT_SNAPS_DIRECTORY_URL: https://snaps.metamask.io/account-management # Modifies how the version is displayed. # eg. instead of 10.25.0 -> 10.25.0-beta.2 @@ -72,7 +72,7 @@ buildTypes: - ALLOW_LOCAL_SNAPS: true - REQUIRE_SNAPS_ALLOWLIST: false - REJECT_INVALID_SNAPS_PLATFORM_VERSION: false - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.12.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.13.0/index.html - SUPPORT_LINK: https://support.metamask.io/ - SUPPORT_REQUEST_LINK: https://support.metamask.io/ - INFURA_ENV_KEY_REF: INFURA_FLASK_PROJECT_ID @@ -96,7 +96,7 @@ buildTypes: - ALLOW_LOCAL_SNAPS: false - REQUIRE_SNAPS_ALLOWLIST: true - REJECT_INVALID_SNAPS_PLATFORM_VERSION: true - - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.12.0/index.html + - IFRAME_EXECUTION_ENVIRONMENT_URL: https://execution.metamask.io/iframe/6.13.0/index.html - MMI_CONFIGURATION_SERVICE_URL: https://configuration.metamask-institutional.io/v2/configuration/default - SUPPORT_LINK: https://support.metamask-institutional.io - SUPPORT_REQUEST_LINK: https://support.metamask-institutional.io diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index b36f23e654bb..f414f9561f73 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1841,6 +1841,7 @@ }, "@metamask/snaps-sdk": { "globals": { + "URL": true, "fetch": true }, "packages": { diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 7bed64327dde..f33998311fef 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1854,6 +1854,7 @@ }, "@metamask/snaps-sdk": { "globals": { + "URL": true, "fetch": true }, "packages": { diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index b36f23e654bb..f414f9561f73 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1841,6 +1841,7 @@ }, "@metamask/snaps-sdk": { "globals": { + "URL": true, "fetch": true }, "packages": { diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 5dad2a30d37e..7874b7e8560f 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -1933,6 +1933,7 @@ }, "@metamask/snaps-sdk": { "globals": { + "URL": true, "fetch": true }, "packages": { diff --git a/package.json b/package.json index 42ac548b4cb7..903ce5b62ab8 100644 --- a/package.json +++ b/package.json @@ -216,7 +216,7 @@ "@trezor/schema-utils@npm:1.0.2": "patch:@trezor/schema-utils@npm%3A1.0.2#~/.yarn/patches/@trezor-schema-utils-npm-1.0.2-7dd48689b2.patch", "lavamoat-core@npm:^15.1.1": "patch:lavamoat-core@npm%3A15.1.1#~/.yarn/patches/lavamoat-core-npm-15.1.1-51fbe39988.patch", "lavamoat-core@npm:^16.2.2": "patch:lavamoat-core@npm%3A16.2.2#~/.yarn/patches/lavamoat-core-npm-16.2.2-e361ff1f8a.patch", - "@metamask/snaps-sdk": "^6.15.0", + "@metamask/snaps-sdk": "^6.16.0", "@swc/types@0.1.5": "^0.1.6", "@babel/core": "patch:@babel/core@npm%3A7.25.9#~/.yarn/patches/@babel-core-npm-7.25.9-4ae3bff7f3.patch", "@babel/runtime": "patch:@babel/runtime@npm%3A7.25.9#~/.yarn/patches/@babel-runtime-npm-7.25.9-fe8c62510a.patch", @@ -345,11 +345,11 @@ "@metamask/selected-network-controller": "^19.0.0", "@metamask/signature-controller": "^23.1.0", "@metamask/smart-transactions-controller": "^16.0.1", - "@metamask/snaps-controllers": "^9.17.0", - "@metamask/snaps-execution-environments": "^6.12.0", - "@metamask/snaps-rpc-methods": "^11.9.1", - "@metamask/snaps-sdk": "^6.15.0", - "@metamask/snaps-utils": "^8.8.0", + "@metamask/snaps-controllers": "^9.18.0", + "@metamask/snaps-execution-environments": "^6.13.0", + "@metamask/snaps-rpc-methods": "^11.10.0", + "@metamask/snaps-sdk": "^6.16.0", + "@metamask/snaps-utils": "^8.9.1", "@metamask/solana-wallet-snap": "^1.1.0", "@metamask/transaction-controller": "^43.0.0", "@metamask/user-operation-controller": "^22.0.0", diff --git a/shared/constants/permissions.ts b/shared/constants/permissions.ts index efcf5bd46872..ba0a0a02d53a 100644 --- a/shared/constants/permissions.ts +++ b/shared/constants/permissions.ts @@ -60,6 +60,7 @@ export const PermissionWeight = Object.freeze({ snap_getLocale: 4, wallet_snap: 4, endowment_networkAccess: 3, + endowment_assets: 3, endowment_webassembly: 4, endowment_transactionInsight: 4, endowment_cronjob: 4, diff --git a/shared/constants/snaps/permissions.ts b/shared/constants/snaps/permissions.ts index 28ae5e12a061..11a7b8fabaa6 100644 --- a/shared/constants/snaps/permissions.ts +++ b/shared/constants/snaps/permissions.ts @@ -10,6 +10,7 @@ export const EndowmentPermissions = Object.freeze({ 'endowment:page-settings': 'endowment:page-settings', 'endowment:signature-insight': 'endowment:signature-insight', 'endowment:name-lookup': 'endowment:name-lookup', + 'endowment:assets': 'endowment:assets', ///: BEGIN:ONLY_INCLUDE_IF(keyring-snaps) 'endowment:keyring': 'endowment:keyring', ///: END:ONLY_INCLUDE_IF diff --git a/test/e2e/snaps/enums.js b/test/e2e/snaps/enums.js index 8ac5dacd1f73..8844ee3eca89 100644 --- a/test/e2e/snaps/enums.js +++ b/test/e2e/snaps/enums.js @@ -1,3 +1,3 @@ module.exports = { - TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/snaps/test-snaps/2.18.0', + TEST_SNAPS_WEBSITE_URL: 'https://metamask.github.io/snaps/test-snaps/2.18.1', }; diff --git a/ui/components/app/metamask-template-renderer/safe-component-list.js b/ui/components/app/metamask-template-renderer/safe-component-list.js index b15bff11247c..d73b4fd85c14 100644 --- a/ui/components/app/metamask-template-renderer/safe-component-list.js +++ b/ui/components/app/metamask-template-renderer/safe-component-list.js @@ -60,6 +60,7 @@ import { import { SnapAccountRedirect } from '../../../pages/snap-account-redirect'; import { CreateNamedSnapAccount } from '../../multichain/create-named-snap-account'; import SnapAuthorshipHeader from '../snaps/snap-authorship-header'; +import { Skeleton } from '../../component-library/skeleton'; ///: END:ONLY_INCLUDE_IF export const safeComponentList = { @@ -108,6 +109,7 @@ export const safeComponentList = { SnapUITooltip, span: 'span', Spinner, + Skeleton, Text, TextArea, TextField, diff --git a/ui/components/app/snaps/snap-ui-image/snap-ui-image.tsx b/ui/components/app/snaps/snap-ui-image/snap-ui-image.tsx index 840ac42845bd..19c708c43346 100644 --- a/ui/components/app/snaps/snap-ui-image/snap-ui-image.tsx +++ b/ui/components/app/snaps/snap-ui-image/snap-ui-image.tsx @@ -5,6 +5,7 @@ export type SnapUIImageProps = { style?: React.CSSProperties; width?: string; height?: string; + borderRadius?: string; }; export const SnapUIImage = ({ @@ -12,6 +13,7 @@ export const SnapUIImage = ({ width, height, style, + borderRadius, }: SnapUIImageProps) => { const src = `data:image/svg+xml;utf8,${encodeURIComponent(value)}`; @@ -22,7 +24,7 @@ export const SnapUIImage = ({ src={src} width={width} height={height} - style={style} + style={{ ...style, borderRadius }} /> ); }; diff --git a/ui/components/app/snaps/snap-ui-renderer/components/image.ts b/ui/components/app/snaps/snap-ui-renderer/components/image.ts index 99a2890ae153..26484ffde95c 100644 --- a/ui/components/app/snaps/snap-ui-renderer/components/image.ts +++ b/ui/components/app/snaps/snap-ui-renderer/components/image.ts @@ -1,9 +1,26 @@ import { ImageElement } from '@metamask/snaps-sdk/jsx'; import { UIComponentFactory } from './types'; +function generateBorderRadius( + borderRadius?: ImageElement['props']['borderRadius'], +) { + switch (borderRadius) { + default: + case 'none': + return '0'; + + case 'medium': + return '6px'; + + case 'full': + return '50%'; + } +} + export const image: UIComponentFactory = ({ element }) => ({ element: 'SnapUIImage', props: { value: element.props.src, + borderRadius: generateBorderRadius(element.props.borderRadius), }, }); diff --git a/ui/components/app/snaps/snap-ui-renderer/components/index.ts b/ui/components/app/snaps/snap-ui-renderer/components/index.ts index f6173b7199b0..64248c4b1a89 100644 --- a/ui/components/app/snaps/snap-ui-renderer/components/index.ts +++ b/ui/components/app/snaps/snap-ui-renderer/components/index.ts @@ -28,6 +28,7 @@ import { icon } from './icon'; import { section } from './section'; import { avatar } from './avatar'; import { banner } from './banner'; +import { skeleton } from './skeleton'; export const COMPONENT_MAPPING = { Box: box, @@ -60,4 +61,5 @@ export const COMPONENT_MAPPING = { Selector: selector, Section: section, Banner: banner, + Skeleton: skeleton, }; diff --git a/ui/components/app/snaps/snap-ui-renderer/components/skeleton.ts b/ui/components/app/snaps/snap-ui-renderer/components/skeleton.ts new file mode 100644 index 000000000000..fbb82ea369fd --- /dev/null +++ b/ui/components/app/snaps/snap-ui-renderer/components/skeleton.ts @@ -0,0 +1,21 @@ +import { SkeletonElement } from '@metamask/snaps-sdk/jsx'; +import { BorderRadius } from '../../../../../helpers/constants/design-system'; +import { mapSnapBorderRadiusToExtensionBorderRadius } from '../utils'; +import { UIComponentFactory } from './types'; + +const DEFAULT_SKELETON_WIDTH = '100%'; +const DEFAULT_SKELETON_HEIGHT = 22; +const DEFAULT_SKELETON_BORDER_RADIUS = BorderRadius.MD; + +export const skeleton: UIComponentFactory = ({ element }) => { + return { + element: 'Skeleton', + props: { + width: element.props.width ?? DEFAULT_SKELETON_WIDTH, + height: element.props.height ?? DEFAULT_SKELETON_HEIGHT, + borderRadius: element.props.borderRadius + ? mapSnapBorderRadiusToExtensionBorderRadius(element.props.borderRadius) + : DEFAULT_SKELETON_BORDER_RADIUS, + }, + }; +}; diff --git a/ui/components/app/snaps/snap-ui-renderer/utils.ts b/ui/components/app/snaps/snap-ui-renderer/utils.ts index c71772618995..47aab572f060 100644 --- a/ui/components/app/snaps/snap-ui-renderer/utils.ts +++ b/ui/components/app/snaps/snap-ui-renderer/utils.ts @@ -5,7 +5,10 @@ import { sha256 } from '@noble/hashes/sha256'; import { NonEmptyArray, bytesToHex, remove0x } from '@metamask/utils'; import { unescape as unescapeEntities } from 'he'; import { ChangeEvent as ReactChangeEvent } from 'react'; -import { BackgroundColor } from '../../../../helpers/constants/design-system'; +import { + BackgroundColor, + BorderRadius, +} from '../../../../helpers/constants/design-system'; import { COMPONENT_MAPPING } from './components'; import { UIComponent } from './components/types'; @@ -156,3 +159,23 @@ export const mapToExtensionCompatibleColor = (color: string) => { }; return color ? backgroundColorMapping[color] : undefined; }; + +/** + * Map Snap custom size for border radius to extension compatible size. + * + * @param snapBorderRadius - Snap custom color. + * @returns String, representing border radius size from design system. + */ +export const mapSnapBorderRadiusToExtensionBorderRadius = ( + snapBorderRadius: string | undefined, +): BorderRadius => { + switch (snapBorderRadius) { + case 'none': + default: + return BorderRadius.none; + case 'medium': + return BorderRadius.MD; + case 'full': + return BorderRadius.full; + } +}; diff --git a/ui/helpers/utils/permission.js b/ui/helpers/utils/permission.js index 7526732d5ec7..576116bd9893 100644 --- a/ui/helpers/utils/permission.js +++ b/ui/helpers/utils/permission.js @@ -523,6 +523,14 @@ export const PERMISSION_DESCRIPTIONS = deepFreeze({ leftIcon: IconName.Search, weight: PermissionWeight.endowment_nameLookup, }), + [EndowmentPermissions['endowment:assets']]: ({ t, subjectName }) => ({ + label: t('permission_assets'), + description: t('permission_assetsDescription', [ + getSnapNameComponent(subjectName), + ]), + leftIcon: IconName.Coin, + weight: PermissionWeight.endowment_assets, + }), [EndowmentPermissions['endowment:signature-insight']]: ({ t, permissionValue, diff --git a/yarn.lock b/yarn.lock index a899bf3cc6d6..7f95a0c748d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6294,9 +6294,9 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-controllers@npm:^9.10.0, @metamask/snaps-controllers@npm:^9.17.0": - version: 9.17.0 - resolution: "@metamask/snaps-controllers@npm:9.17.0" +"@metamask/snaps-controllers@npm:^9.10.0, @metamask/snaps-controllers@npm:^9.18.0": + version: 9.18.0 + resolution: "@metamask/snaps-controllers@npm:9.18.0" dependencies: "@metamask/approval-controller": "npm:^7.1.2" "@metamask/base-controller": "npm:^7.0.3" @@ -6309,9 +6309,9 @@ __metadata: "@metamask/post-message-stream": "npm:^9.0.0" "@metamask/rpc-errors": "npm:^7.0.2" "@metamask/snaps-registry": "npm:^3.2.3" - "@metamask/snaps-rpc-methods": "npm:^11.9.0" - "@metamask/snaps-sdk": "npm:^6.15.0" - "@metamask/snaps-utils": "npm:^8.8.0" + "@metamask/snaps-rpc-methods": "npm:^11.10.0" + "@metamask/snaps-sdk": "npm:^6.16.0" + "@metamask/snaps-utils": "npm:^8.9.0" "@metamask/utils": "npm:^11.0.1" "@xstate/fsm": "npm:^2.0.0" async-mutex: "npm:^0.5.0" @@ -6327,30 +6327,30 @@ __metadata: semver: "npm:^7.5.4" tar-stream: "npm:^3.1.7" peerDependencies: - "@metamask/snaps-execution-environments": ^6.12.0 + "@metamask/snaps-execution-environments": ^6.13.0 peerDependenciesMeta: "@metamask/snaps-execution-environments": optional: true - checksum: 10/c09eb4a31e685a9fbe41f2b407d9037785e572a7ef135ecfbede3cf015eaa87bef53c17e615a85ad8bbb757d8baf969cd14766dc70c04aa7645ef819ef03417d + checksum: 10/a8691243fe69a4bd7b39074571950cb9ce01b4d8ce129925f4e08c8a4c895d9736f7bb7a6d5ebc94e2a2db1605a44382938300e560bcdf5ff894e6c17386e37d languageName: node linkType: hard -"@metamask/snaps-execution-environments@npm:^6.12.0": - version: 6.12.0 - resolution: "@metamask/snaps-execution-environments@npm:6.12.0" +"@metamask/snaps-execution-environments@npm:^6.13.0": + version: 6.13.0 + resolution: "@metamask/snaps-execution-environments@npm:6.13.0" dependencies: "@metamask/json-rpc-engine": "npm:^10.0.2" "@metamask/object-multiplex": "npm:^2.1.0" "@metamask/post-message-stream": "npm:^9.0.0" "@metamask/providers": "npm:^18.3.1" "@metamask/rpc-errors": "npm:^7.0.2" - "@metamask/snaps-sdk": "npm:^6.15.0" - "@metamask/snaps-utils": "npm:^8.8.0" + "@metamask/snaps-sdk": "npm:^6.16.0" + "@metamask/snaps-utils": "npm:^8.9.0" "@metamask/superstruct": "npm:^3.1.0" "@metamask/utils": "npm:^11.0.1" nanoid: "npm:^3.1.31" readable-stream: "npm:^3.6.2" - checksum: 10/1c79214467e804b09b2889a7961f7907ef84797038d9970913e3fb310890ac8431010a28a77acf611a4aeea24358425a85cb57c3712264201b99fe6ee8011d0c + checksum: 10/233e6f0a930ac4f7e6e5a86e57640b137c409208379ab0405a9d3bf835668687751ae25a7fced140955272d700201cd254481093e7d7bb1359198699680f7bce languageName: node linkType: hard @@ -6366,39 +6366,39 @@ __metadata: languageName: node linkType: hard -"@metamask/snaps-rpc-methods@npm:^11.9.0, @metamask/snaps-rpc-methods@npm:^11.9.1": - version: 11.9.1 - resolution: "@metamask/snaps-rpc-methods@npm:11.9.1" +"@metamask/snaps-rpc-methods@npm:^11.10.0": + version: 11.10.0 + resolution: "@metamask/snaps-rpc-methods@npm:11.10.0" dependencies: "@metamask/key-tree": "npm:^10.0.2" "@metamask/permission-controller": "npm:^11.0.5" "@metamask/rpc-errors": "npm:^7.0.2" - "@metamask/snaps-sdk": "npm:^6.15.0" - "@metamask/snaps-utils": "npm:^8.8.0" + "@metamask/snaps-sdk": "npm:^6.16.0" + "@metamask/snaps-utils": "npm:^8.9.0" "@metamask/superstruct": "npm:^3.1.0" "@metamask/utils": "npm:^11.0.1" "@noble/hashes": "npm:^1.3.1" luxon: "npm:^3.5.0" - checksum: 10/bd39c232ad96999573dbb79e4c99cea54b2f1a4a94426c81500dc362e5d27eafa8986304f6ee11601a6b3410b95199a1c547f6be4adc12bc0efe910e10299972 + checksum: 10/6a5d4efaa1ae7df4a5f3ea3e6917a1f837bb0458c576bed74ab769e6f73c78cd292776da94d9feb5dfc023baa88dae67442a0502462aa37138473af1f5cc91f3 languageName: node linkType: hard -"@metamask/snaps-sdk@npm:^6.15.0": - version: 6.15.0 - resolution: "@metamask/snaps-sdk@npm:6.15.0" +"@metamask/snaps-sdk@npm:^6.16.0": + version: 6.16.0 + resolution: "@metamask/snaps-sdk@npm:6.16.0" dependencies: "@metamask/key-tree": "npm:^10.0.2" "@metamask/providers": "npm:^18.3.1" "@metamask/rpc-errors": "npm:^7.0.2" "@metamask/superstruct": "npm:^3.1.0" "@metamask/utils": "npm:^11.0.1" - checksum: 10/0e561a0b3ae96521efbdb7223a46e42a634f84a61f271288b5c549ccc2a974247100925d551b359bd84d76aec75529dff726176e5379f446721c48f702cf2598 + checksum: 10/eb76c00df13a845f2c19ec014b1439647adda1455486f4d4b0153e0690eccf7bc1ba0dc8a5472566f267eba722ef26bd99a15a49ed7c5273ff7b452f5d4b7600 languageName: node linkType: hard -"@metamask/snaps-utils@npm:^8.3.0, @metamask/snaps-utils@npm:^8.8.0": - version: 8.8.0 - resolution: "@metamask/snaps-utils@npm:8.8.0" +"@metamask/snaps-utils@npm:^8.3.0, @metamask/snaps-utils@npm:^8.9.0, @metamask/snaps-utils@npm:^8.9.1": + version: 8.9.1 + resolution: "@metamask/snaps-utils@npm:8.9.1" dependencies: "@babel/core": "npm:^7.23.2" "@babel/types": "npm:^7.23.0" @@ -6408,7 +6408,7 @@ __metadata: "@metamask/rpc-errors": "npm:^7.0.2" "@metamask/slip44": "npm:^4.1.0" "@metamask/snaps-registry": "npm:^3.2.3" - "@metamask/snaps-sdk": "npm:^6.15.0" + "@metamask/snaps-sdk": "npm:^6.16.0" "@metamask/superstruct": "npm:^3.1.0" "@metamask/utils": "npm:^11.0.1" "@noble/hashes": "npm:^1.3.1" @@ -6423,7 +6423,7 @@ __metadata: semver: "npm:^7.5.4" ses: "npm:^1.1.0" validate-npm-package-name: "npm:^5.0.0" - checksum: 10/567354cf09dc74fe392e281e836325bfec570428dd77101935fa443bcc987bfdee6a568a572b92269639fda30a7f02ff1047ad887aed52b73709ab7a6bf1cddd + checksum: 10/2917fbdccb23c831b613857c3a5738d34352697dae84173a3d24dbcb4c38edf23989fb089870187885dcf867a55ec731c1ac05e9809a7d6804dbe28c57e6da50 languageName: node linkType: hard @@ -26742,11 +26742,11 @@ __metadata: "@metamask/selected-network-controller": "npm:^19.0.0" "@metamask/signature-controller": "npm:^23.1.0" "@metamask/smart-transactions-controller": "npm:^16.0.1" - "@metamask/snaps-controllers": "npm:^9.17.0" - "@metamask/snaps-execution-environments": "npm:^6.12.0" - "@metamask/snaps-rpc-methods": "npm:^11.9.1" - "@metamask/snaps-sdk": "npm:^6.15.0" - "@metamask/snaps-utils": "npm:^8.8.0" + "@metamask/snaps-controllers": "npm:^9.18.0" + "@metamask/snaps-execution-environments": "npm:^6.13.0" + "@metamask/snaps-rpc-methods": "npm:^11.10.0" + "@metamask/snaps-sdk": "npm:^6.16.0" + "@metamask/snaps-utils": "npm:^8.9.1" "@metamask/solana-wallet-snap": "npm:^1.1.0" "@metamask/test-bundler": "npm:^1.0.0" "@metamask/test-dapp": "npm:9.0.0" From e2fea0f4eabbdc22406b496df76b6ec6fa304d48 Mon Sep 17 00:00:00 2001 From: Xiaoming Wang <7315988+dawnseeker8@users.noreply.github.com> Date: Tue, 28 Jan 2025 17:40:27 +0800 Subject: [PATCH 4/4] fix: bump `@metamask/eth-ledger-bridge-keyring` to `^8.0.3` to fix Ledger's handling of EIP-712 content (#29820) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## **Description** Ledger team request us to upgrade the @ledgerhq/hw-app-eth to 6.42.0 to fix ledger bug for EIP-712 content Here is some comment from Kevin LAMBERT from ledger team: and this is original thread https://consensys.slack.com/archives/C02CYKAA8G1/p1737132760664329?thread_ts=1737106010.543919&cid=C02CYKAA8G1 [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29820?quickstart=1) ## **Related issues** Fixes: #29813 Please also check the related [PR](https://github.com/MetaMask/metamask-extension/pull/29874) on release 12.11 ## **Manual testing steps** Will require a full regression test for ledger feature. ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: MetaMask Bot Co-authored-by: Sébastien Van Eyck Co-authored-by: Charly Chevalier --- ...erhq-evm-tools-npm-1.3.0-57435278f6.patch} | 8 +- ...hq-hw-app-eth-npm-6.42.2-46a44bfbf5.patch} | 24 ++-- app/scripts/metamask-controller.js | 2 +- lavamoat/browserify/beta/policy.json | 37 +----- lavamoat/browserify/flask/policy.json | 37 +----- lavamoat/browserify/main/policy.json | 37 +----- lavamoat/browserify/mmi/policy.json | 37 +----- offscreen/scripts/ledger.ts | 2 +- package.json | 6 +- yarn.lock | 124 +++++++++--------- 10 files changed, 101 insertions(+), 213 deletions(-) rename .yarn/patches/{@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch => @ledgerhq-evm-tools-npm-1.3.0-57435278f6.patch} (73%) rename .yarn/patches/{@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch => @ledgerhq-hw-app-eth-npm-6.42.2-46a44bfbf5.patch} (74%) diff --git a/.yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch b/.yarn/patches/@ledgerhq-evm-tools-npm-1.3.0-57435278f6.patch similarity index 73% rename from .yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch rename to .yarn/patches/@ledgerhq-evm-tools-npm-1.3.0-57435278f6.patch index 15335a88e494..19002b9ed7ab 100644 --- a/.yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch +++ b/.yarn/patches/@ledgerhq-evm-tools-npm-1.3.0-57435278f6.patch @@ -1,11 +1,11 @@ diff --git a/lib/message/EIP712/index.js b/lib/message/EIP712/index.js -index 5443ac06d4ef29028e3acce98210949da2ef9263..57ec8615340a9285290ad5d2c2522ed19af2d0fc 100644 +index a5c677ebf53ab6c22987cebf1c92b21c6245b5db..f5a5580df74100d5e1725bb783038c4c60ae1dbc 100644 --- a/lib/message/EIP712/index.js +++ b/lib/message/EIP712/index.js -@@ -28,8 +28,8 @@ const ethers_1 = require("ethers"); - const axios_1 = __importDefault(require("axios")); - const sha224_1 = __importDefault(require("crypto-js/sha224")); +@@ -29,8 +29,8 @@ const sha224_1 = __importDefault(require("crypto-js/sha224")); const live_env_1 = require("@ledgerhq/live-env"); + const constants_1 = require("@ethersproject/constants"); + const hash_1 = require("@ethersproject/hash"); -const eip712_1 = __importDefault(require("@ledgerhq/cryptoassets-evm-signatures/data/eip712")); -const eip712_v2_1 = __importDefault(require("@ledgerhq/cryptoassets-evm-signatures/data/eip712_v2")); +const eip712_1 = __importDefault(require("@ledgerhq/cryptoassets-evm-signatures/lib/data/eip712")); diff --git a/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch b/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.42.2-46a44bfbf5.patch similarity index 74% rename from .yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch rename to .yarn/patches/@ledgerhq-hw-app-eth-npm-6.42.2-46a44bfbf5.patch index cfefcca767a7..bc0e13b93194 100644 --- a/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch +++ b/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.42.2-46a44bfbf5.patch @@ -1,5 +1,5 @@ diff --git a/lib/modules/EIP712/index.js b/lib/modules/EIP712/index.js -index bbca23c9a596b2b300aca0f323bad277a4190def..c85cb18c3d6ff049c442d358b4d834c04a49951f 100644 +index 24251b4584b04fd138b8892f027ccad60b14fc9e..4b99b94cf2327042b53687b4e2b076bd0cb8fba1 100644 --- a/lib/modules/EIP712/index.js +++ b/lib/modules/EIP712/index.js @@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); @@ -12,7 +12,7 @@ index bbca23c9a596b2b300aca0f323bad277a4190def..c85cb18c3d6ff049c442d358b4d834c0 const utils_1 = require("../../utils"); const loadConfig_1 = require("../../services/ledger/loadConfig"); diff --git a/lib/modules/EIP712/utils.js b/lib/modules/EIP712/utils.js -index 4f09ea8a24ae4f175f1a4d2d40999d36ffa2a915..1cc7de0d5ffd2b980741ad6d85a75792085c031b 100644 +index 4f09ea8a24ae4f175f1a4d2d40999d36ffa2a915..38225b98bc124d8648d1ff110570293f165bd2a6 100644 --- a/lib/modules/EIP712/utils.js +++ b/lib/modules/EIP712/utils.js @@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { @@ -25,7 +25,7 @@ index 4f09ea8a24ae4f175f1a4d2d40999d36ffa2a915..1cc7de0d5ffd2b980741ad6d85a75792 /** * @ignore for the README diff --git a/lib/services/ledger/erc20.js b/lib/services/ledger/erc20.js -index 8fdedf8037b2684ab6d48fd279a0c014b074b676..c10cea22504a4d3cd72bfac51463e5664639d20e 100644 +index 8fdedf8037b2684ab6d48fd279a0c014b074b676..90ce6589407c1b8719550c21251f3f247fcef085 100644 --- a/lib/services/ledger/erc20.js +++ b/lib/services/ledger/erc20.js @@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); @@ -38,26 +38,26 @@ index 8fdedf8037b2684ab6d48fd279a0c014b074b676..c10cea22504a4d3cd72bfac51463e566 const asContractAddress = (addr) => { const a = addr.toLowerCase(); diff --git a/lib/services/ledger/index.js b/lib/services/ledger/index.js -index 8385537236dfc98902376b29f712e9f7b605091a..6641b951b0c7e477fe5622c724ee22b9e5272213 100644 +index 86db9973e63e1ac7c0e7f67e53ca8f05aa809805..29ebceeab40cdad75092d8af747d770411f8a605 100644 --- a/lib/services/ledger/index.js +++ b/lib/services/ledger/index.js @@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); - // This implements the resolution of a Transaction using Ledger's own API - const logs_1 = require("@ledgerhq/logs"); + const transactions_1 = require("@ethersproject/transactions"); const abi_1 = require("@ethersproject/abi"); + const logs_1 = require("@ledgerhq/logs"); -const index_1 = require("@ledgerhq/domain-service/signers/index"); +const index_1 = require("@ledgerhq/domain-service/lib/signers/index"); + const constants_1 = require("../../modules/Uniswap/constants"); const erc20_1 = require("./erc20"); - const contracts_1 = require("./contracts"); - const nfts_1 = require("./nfts"); + const Uniswap_1 = require("../../modules/Uniswap"); diff --git a/lib/utils.js b/lib/utils.js -index 027089bf09c047b34af79e3dea253d5335d336f3..1c5da628db47a33099532973de9ea634a1ee65df 100644 +index 6c5f58439116b2c6b5844f5e17d0eb876a436f41..e719e9840d33721ef79bb12232991621c828b501 100644 --- a/lib/utils.js +++ b/lib/utils.js -@@ -2,7 +2,7 @@ - Object.defineProperty(exports, "__esModule", { value: true }); - exports.mergeResolutions = exports.nftSelectors = exports.tokenSelectors = exports.intAsHexBytes = exports.decodeTxInfo = exports.maybeHexBuffer = exports.hexBuffer = exports.splitPath = exports.padHexString = exports.ERC1155_CLEAR_SIGNED_SELECTORS = exports.ERC721_CLEAR_SIGNED_SELECTORS = exports.ERC20_CLEAR_SIGNED_SELECTORS = void 0; +@@ -26,7 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); + exports.safeChunkTransaction = exports.getV = exports.getChainIdAsUint32 = exports.getParity = exports.mergeResolutions = exports.nftSelectors = exports.tokenSelectors = exports.intAsHexBytes = exports.maybeHexBuffer = exports.hexBuffer = exports.splitPath = exports.padHexString = exports.ERC1155_CLEAR_SIGNED_SELECTORS = exports.ERC721_CLEAR_SIGNED_SELECTORS = exports.ERC20_CLEAR_SIGNED_SELECTORS = void 0; const bignumber_js_1 = require("bignumber.js"); + const rlp = __importStar(require("@ethersproject/rlp")); -const index_1 = require("@ledgerhq/evm-tools/selectors/index"); +const index_1 = require("@ledgerhq/evm-tools/lib/selectors/index"); Object.defineProperty(exports, "ERC20_CLEAR_SIGNED_SELECTORS", { enumerable: true, get: function () { return index_1.ERC20_CLEAR_SIGNED_SELECTORS; } }); diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index c448644fda44..95bdd11206cb 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -4820,7 +4820,7 @@ export default class MetamaskController extends EventEmitter { async attemptLedgerTransportCreation() { return await this.#withKeyringForDevice( - HardwareDeviceNames.ledger, + { name: HardwareDeviceNames.ledger }, async (keyring) => keyring.attemptMakeApp(), ); } diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index f414f9561f73..35332269cbd5 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -693,11 +693,12 @@ }, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools": { "packages": { + "ethers>@ethersproject/constants": true, + "@ethersproject/hash": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios": true, - "@metamask/ppom-validator>crypto-js": true, - "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": true + "@metamask/ppom-validator>crypto-js": true } }, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": { @@ -707,6 +708,7 @@ "packages": { "@ethersproject/abi": true, "ethers>@ethersproject/rlp": true, + "ethers>@ethersproject/transactions": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/domain-service": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/errors": true, @@ -4044,37 +4046,6 @@ "ethers>@ethersproject/wordlists": true } }, - "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": { - "packages": { - "@ethersproject/abi": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "@ethersproject/bignumber": true, - "@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "@ethersproject/contracts": true, - "@ethersproject/hash": true, - "@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "@ethersproject/providers": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/solidity": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/units": true, - "@ethersproject/wallet": true, - "@ethersproject/providers>@ethersproject/web": true, - "ethers>@ethersproject/wordlists": true - } - }, "eth-method-registry>@metamask/ethjs-contract>ethjs-abi": { "packages": { "bn.js": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index f33998311fef..79934423e13c 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -693,11 +693,12 @@ }, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools": { "packages": { + "ethers>@ethersproject/constants": true, + "@ethersproject/hash": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios": true, - "@metamask/ppom-validator>crypto-js": true, - "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": true + "@metamask/ppom-validator>crypto-js": true } }, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": { @@ -707,6 +708,7 @@ "packages": { "@ethersproject/abi": true, "ethers>@ethersproject/rlp": true, + "ethers>@ethersproject/transactions": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/domain-service": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/errors": true, @@ -4057,37 +4059,6 @@ "ethers>@ethersproject/wordlists": true } }, - "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": { - "packages": { - "@ethersproject/abi": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "@ethersproject/bignumber": true, - "@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "@ethersproject/contracts": true, - "@ethersproject/hash": true, - "@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "@ethersproject/providers": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/solidity": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/units": true, - "@ethersproject/wallet": true, - "@ethersproject/providers>@ethersproject/web": true, - "ethers>@ethersproject/wordlists": true - } - }, "eth-method-registry>@metamask/ethjs-contract>ethjs-abi": { "packages": { "bn.js": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index f414f9561f73..35332269cbd5 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -693,11 +693,12 @@ }, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools": { "packages": { + "ethers>@ethersproject/constants": true, + "@ethersproject/hash": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios": true, - "@metamask/ppom-validator>crypto-js": true, - "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": true + "@metamask/ppom-validator>crypto-js": true } }, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": { @@ -707,6 +708,7 @@ "packages": { "@ethersproject/abi": true, "ethers>@ethersproject/rlp": true, + "ethers>@ethersproject/transactions": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/domain-service": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/errors": true, @@ -4044,37 +4046,6 @@ "ethers>@ethersproject/wordlists": true } }, - "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": { - "packages": { - "@ethersproject/abi": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "@ethersproject/bignumber": true, - "@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "@ethersproject/contracts": true, - "@ethersproject/hash": true, - "@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "@ethersproject/providers": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/solidity": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/units": true, - "@ethersproject/wallet": true, - "@ethersproject/providers>@ethersproject/web": true, - "ethers>@ethersproject/wordlists": true - } - }, "eth-method-registry>@metamask/ethjs-contract>ethjs-abi": { "packages": { "bn.js": true, diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 7874b7e8560f..9e3248e669d0 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -693,11 +693,12 @@ }, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools": { "packages": { + "ethers>@ethersproject/constants": true, + "@ethersproject/hash": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>@ledgerhq/live-env": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>axios": true, - "@metamask/ppom-validator>crypto-js": true, - "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": true + "@metamask/ppom-validator>crypto-js": true } }, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth": { @@ -707,6 +708,7 @@ "packages": { "@ethersproject/abi": true, "ethers>@ethersproject/rlp": true, + "ethers>@ethersproject/transactions": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/cryptoassets-evm-signatures": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/domain-service": true, "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/errors": true, @@ -4136,37 +4138,6 @@ "ethers>@ethersproject/wordlists": true } }, - "@metamask/eth-ledger-bridge-keyring>@ledgerhq/hw-app-eth>@ledgerhq/evm-tools>ethers": { - "packages": { - "@ethersproject/abi": true, - "ethers>@ethersproject/abstract-signer": true, - "ethers>@ethersproject/address": true, - "ethers>@ethersproject/base64": true, - "ethers>@ethersproject/basex": true, - "@ethersproject/bignumber": true, - "@ethersproject/bytes": true, - "ethers>@ethersproject/constants": true, - "@ethersproject/contracts": true, - "@ethersproject/hash": true, - "@ethersproject/hdnode": true, - "ethers>@ethersproject/json-wallets": true, - "ethers>@ethersproject/keccak256": true, - "ethers>@ethersproject/logger": true, - "ethers>@ethersproject/properties": true, - "@ethersproject/providers": true, - "ethers>@ethersproject/random": true, - "ethers>@ethersproject/rlp": true, - "ethers>@ethersproject/sha2": true, - "ethers>@ethersproject/signing-key": true, - "ethers>@ethersproject/solidity": true, - "ethers>@ethersproject/strings": true, - "ethers>@ethersproject/transactions": true, - "ethers>@ethersproject/units": true, - "@ethersproject/wallet": true, - "@ethersproject/providers>@ethersproject/web": true, - "ethers>@ethersproject/wordlists": true - } - }, "eth-method-registry>@metamask/ethjs-contract>ethjs-abi": { "packages": { "bn.js": true, diff --git a/offscreen/scripts/ledger.ts b/offscreen/scripts/ledger.ts index 4cff2f3a6748..4e03def36068 100644 --- a/offscreen/scripts/ledger.ts +++ b/offscreen/scripts/ledger.ts @@ -96,7 +96,7 @@ function setupMessageListeners(iframe: HTMLIFrameElement) { export default async function init() { return new Promise((resolve) => { const iframe = document.createElement('iframe'); - iframe.src = 'https://metamask.github.io/ledger-iframe-bridge/8.0.0/'; + iframe.src = 'https://metamask.github.io/ledger-iframe-bridge/8.0.3/'; iframe.allow = 'hid'; iframe.onload = () => { setupMessageListeners(iframe); diff --git a/package.json b/package.json index 903ce5b62ab8..74586490a23d 100644 --- a/package.json +++ b/package.json @@ -238,8 +238,8 @@ "@ledgerhq/domain-service/axios": "^0.28.0", "@ledgerhq/evm-tools/axios": "^0.28.0", "@ledgerhq/hw-app-eth/axios": "^0.28.0", - "@ledgerhq/hw-app-eth@npm:^6.39.0": "patch:@ledgerhq/hw-app-eth@npm%3A6.39.0#~/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch", - "@ledgerhq/evm-tools@npm:^1.2.3": "patch:@ledgerhq/evm-tools@npm%3A1.2.3#~/.yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch", + "@ledgerhq/hw-app-eth@npm:^6.42.0": "patch:@ledgerhq/hw-app-eth@npm%3A6.42.2#~/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.42.2-46a44bfbf5.patch", + "@ledgerhq/evm-tools@npm:^1.3.0": "patch:@ledgerhq/evm-tools@npm%3A1.3.0#~/.yarn/patches/@ledgerhq-evm-tools-npm-1.3.0-57435278f6.patch", "cross-spawn@npm:^5.0.1": "^7.0.6", "@solana/web3.js@npm:^1.95.0": "^1.95.8", "secp256k1@npm:^4.0.0": "4.0.4", @@ -301,7 +301,7 @@ "@metamask/ens-resolver-snap": "^0.1.2", "@metamask/eth-json-rpc-filters": "^9.0.0", "@metamask/eth-json-rpc-middleware": "^15.1.2", - "@metamask/eth-ledger-bridge-keyring": "^8.0.2", + "@metamask/eth-ledger-bridge-keyring": "^8.0.3", "@metamask/eth-sig-util": "^7.0.1", "@metamask/eth-snap-keyring": "^8.1.1", "@metamask/eth-token-tracker": "^10.0.2", diff --git a/yarn.lock b/yarn.lock index 7f95a0c748d0..506e702a4aae 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2725,7 +2725,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/rlp@npm:5.7.0, @ethersproject/rlp@npm:^5.5.0, @ethersproject/rlp@npm:^5.7.0": +"@ethersproject/rlp@npm:5.7.0, @ethersproject/rlp@npm:^5.7.0": version: 5.7.0 resolution: "@ethersproject/rlp@npm:5.7.0" dependencies: @@ -4321,13 +4321,13 @@ __metadata: languageName: node linkType: hard -"@ledgerhq/cryptoassets-evm-signatures@npm:^13.5.0": - version: 13.5.0 - resolution: "@ledgerhq/cryptoassets-evm-signatures@npm:13.5.0" +"@ledgerhq/cryptoassets-evm-signatures@npm:^13.5.2": + version: 13.5.2 + resolution: "@ledgerhq/cryptoassets-evm-signatures@npm:13.5.2" dependencies: - "@ledgerhq/live-env": "npm:^2.3.0" + "@ledgerhq/live-env": "npm:^2.4.1" axios: "npm:1.7.7" - checksum: 10/ce6e3343fdf60255ede1d784a2fb47c8c5f49e8257559947e2678fac250700140695c85ae06bef777ccc4bb37577db813a4b3d031f3b0b84cbcd6e139613fbf9 + checksum: 10/2cf692c111523fa634a6eeadfbe1e9eca29fd9e8c03a04dac00f0c191becdc0300bf90d1a5a0190b6ac8cf1436bb14009b50039e3611c55dd6843a6ec45230ec languageName: node linkType: hard @@ -4343,18 +4343,18 @@ __metadata: languageName: node linkType: hard -"@ledgerhq/domain-service@npm:^1.2.6": - version: 1.2.6 - resolution: "@ledgerhq/domain-service@npm:1.2.6" +"@ledgerhq/domain-service@npm:^1.2.15": + version: 1.2.15 + resolution: "@ledgerhq/domain-service@npm:1.2.15" dependencies: "@ledgerhq/errors": "npm:^6.19.1" "@ledgerhq/logs": "npm:^6.12.0" - "@ledgerhq/types-live": "npm:^6.52.0" + "@ledgerhq/types-live": "npm:^6.56.0" axios: "npm:1.7.7" eip55: "npm:^2.1.1" react: "npm:^18.2.0" react-dom: "npm:^18.2.0" - checksum: 10/0b680af9deff24f608446cb7026b06e09ea693a367a5ef5e71068c70fabfbb98019cb618daefed278ed875a0ff5d296735fb743746ac0edee1357ae12fd58d99 + checksum: 10/04585a2558512fa0bf07df89d608449cb184c3ae61d33364e67701b42353bd28c922c2bd5e8b6f843beffa3ae5667f3bc7bc9802a5c6a977ddf75a15f10e3895 languageName: node linkType: hard @@ -4365,71 +4365,75 @@ __metadata: languageName: node linkType: hard -"@ledgerhq/evm-tools@npm:1.2.3": - version: 1.2.3 - resolution: "@ledgerhq/evm-tools@npm:1.2.3" +"@ledgerhq/evm-tools@npm:1.3.0": + version: 1.3.0 + resolution: "@ledgerhq/evm-tools@npm:1.3.0" dependencies: - "@ledgerhq/cryptoassets-evm-signatures": "npm:^13.5.0" - "@ledgerhq/live-env": "npm:^2.3.0" + "@ethersproject/constants": "npm:^5.7.0" + "@ethersproject/hash": "npm:^5.7.0" + "@ledgerhq/cryptoassets-evm-signatures": "npm:^13.5.2" + "@ledgerhq/live-env": "npm:^2.4.1" axios: "npm:1.7.7" crypto-js: "npm:4.2.0" - ethers: "npm:5.7.2" - checksum: 10/956a0a3ac26454ac350c5e34b5cfb911ed3a0f3f724bec1ce2c56f2de344635b582f977e4901841c353d98c50b076e40bfb03d865eed3a82e328744043e00ee7 + checksum: 10/e4394a3065391d44efe958a043df6fade68e789f18386d2a22f51574eb6b723151c8e631af2bce21b951b1908930145181cf8db41fe546e4a06c34a81cb3ff6b languageName: node linkType: hard -"@ledgerhq/evm-tools@patch:@ledgerhq/evm-tools@npm%3A1.2.3#~/.yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch": - version: 1.2.3 - resolution: "@ledgerhq/evm-tools@patch:@ledgerhq/evm-tools@npm%3A1.2.3#~/.yarn/patches/@ledgerhq-evm-tools-npm-1.2.3-414f44baa9.patch::version=1.2.3&hash=1deaa9" +"@ledgerhq/evm-tools@patch:@ledgerhq/evm-tools@npm%3A1.3.0#~/.yarn/patches/@ledgerhq-evm-tools-npm-1.3.0-57435278f6.patch": + version: 1.3.0 + resolution: "@ledgerhq/evm-tools@patch:@ledgerhq/evm-tools@npm%3A1.3.0#~/.yarn/patches/@ledgerhq-evm-tools-npm-1.3.0-57435278f6.patch::version=1.3.0&hash=2f2218" dependencies: - "@ledgerhq/cryptoassets-evm-signatures": "npm:^13.5.0" - "@ledgerhq/live-env": "npm:^2.3.0" + "@ethersproject/constants": "npm:^5.7.0" + "@ethersproject/hash": "npm:^5.7.0" + "@ledgerhq/cryptoassets-evm-signatures": "npm:^13.5.2" + "@ledgerhq/live-env": "npm:^2.4.1" axios: "npm:1.7.7" crypto-js: "npm:4.2.0" - ethers: "npm:5.7.2" - checksum: 10/c7d79c691f681376efc6c44d16a00f6349301091a82a7a8ad264475562896bf8a9b4e922080f4f6f541bb62483ad9efeeec87910fa6f15d9db3e1d22820548c8 + checksum: 10/c3a98a0de38be7f1ee7484b62031f4382dc2691c9a4385d79a2a20cbbf7748a3c84bf19b00ec6aa487464d8d8d8debf529fdc286a4678d16912dce8a07ce3c4d languageName: node linkType: hard -"@ledgerhq/hw-app-eth@npm:6.39.0": - version: 6.39.0 - resolution: "@ledgerhq/hw-app-eth@npm:6.39.0" +"@ledgerhq/hw-app-eth@npm:6.42.2": + version: 6.42.2 + resolution: "@ledgerhq/hw-app-eth@npm:6.42.2" dependencies: - "@ethersproject/abi": "npm:^5.5.0" - "@ethersproject/rlp": "npm:^5.5.0" - "@ledgerhq/cryptoassets-evm-signatures": "npm:^13.5.0" - "@ledgerhq/domain-service": "npm:^1.2.6" + "@ethersproject/abi": "npm:^5.7.0" + "@ethersproject/rlp": "npm:^5.7.0" + "@ethersproject/transactions": "npm:^5.7.0" + "@ledgerhq/cryptoassets-evm-signatures": "npm:^13.5.2" + "@ledgerhq/domain-service": "npm:^1.2.15" "@ledgerhq/errors": "npm:^6.19.1" - "@ledgerhq/evm-tools": "npm:^1.2.3" + "@ledgerhq/evm-tools": "npm:^1.3.0" "@ledgerhq/hw-transport": "npm:^6.31.4" "@ledgerhq/hw-transport-mocker": "npm:^6.29.4" "@ledgerhq/logs": "npm:^6.12.0" - "@ledgerhq/types-live": "npm:^6.52.0" + "@ledgerhq/types-live": "npm:^6.56.0" axios: "npm:1.7.7" bignumber.js: "npm:^9.1.2" semver: "npm:^7.3.5" - checksum: 10/5b50aac35989e09704557523efe5b6b29a1f31f5279088ecceb90164e32e05860f3ff20c32a084003a69723ed08165ae140c2987424657245f088c3f9a908cd6 + checksum: 10/58a80daa4a1d6881fc0188ee68f6d3ff76c753e558e9b299cc0ae04859a111881c372445c06bc7c68f25b03aa51a31c335cc3fc4188c25552fc490c7da85fcdc languageName: node linkType: hard -"@ledgerhq/hw-app-eth@patch:@ledgerhq/hw-app-eth@npm%3A6.39.0#~/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch": - version: 6.39.0 - resolution: "@ledgerhq/hw-app-eth@patch:@ledgerhq/hw-app-eth@npm%3A6.39.0#~/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.39.0-866309bbbe.patch::version=6.39.0&hash=f5404c" +"@ledgerhq/hw-app-eth@patch:@ledgerhq/hw-app-eth@npm%3A6.42.2#~/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.42.2-46a44bfbf5.patch": + version: 6.42.2 + resolution: "@ledgerhq/hw-app-eth@patch:@ledgerhq/hw-app-eth@npm%3A6.42.2#~/.yarn/patches/@ledgerhq-hw-app-eth-npm-6.42.2-46a44bfbf5.patch::version=6.42.2&hash=5d4d32" dependencies: - "@ethersproject/abi": "npm:^5.5.0" - "@ethersproject/rlp": "npm:^5.5.0" - "@ledgerhq/cryptoassets-evm-signatures": "npm:^13.5.0" - "@ledgerhq/domain-service": "npm:^1.2.6" + "@ethersproject/abi": "npm:^5.7.0" + "@ethersproject/rlp": "npm:^5.7.0" + "@ethersproject/transactions": "npm:^5.7.0" + "@ledgerhq/cryptoassets-evm-signatures": "npm:^13.5.2" + "@ledgerhq/domain-service": "npm:^1.2.15" "@ledgerhq/errors": "npm:^6.19.1" - "@ledgerhq/evm-tools": "npm:^1.2.3" + "@ledgerhq/evm-tools": "npm:^1.3.0" "@ledgerhq/hw-transport": "npm:^6.31.4" "@ledgerhq/hw-transport-mocker": "npm:^6.29.4" "@ledgerhq/logs": "npm:^6.12.0" - "@ledgerhq/types-live": "npm:^6.52.0" + "@ledgerhq/types-live": "npm:^6.56.0" axios: "npm:1.7.7" bignumber.js: "npm:^9.1.2" semver: "npm:^7.3.5" - checksum: 10/fb270eee2b2d0886462908b4c511262da0c884f0b72ab50225407608d197ece71b05b4fdc07e628c75ab3ae573e49ed5c3ccf3b2f40a28e4663a28788d46b4dd + checksum: 10/9f62c5eea23fddef9b67c9a70e9f0a7147eb05cd43a7579067d31a4899f0ef6d155cb0591736702e101794322cd0c496214c0121045e1ebf53e618a0ec2ee215 languageName: node linkType: hard @@ -4456,13 +4460,13 @@ __metadata: languageName: node linkType: hard -"@ledgerhq/live-env@npm:^2.3.0": - version: 2.3.0 - resolution: "@ledgerhq/live-env@npm:2.3.0" +"@ledgerhq/live-env@npm:^2.4.1": + version: 2.4.1 + resolution: "@ledgerhq/live-env@npm:2.4.1" dependencies: rxjs: "npm:^7.8.1" utility-types: "npm:^3.10.0" - checksum: 10/757ff834d6b94dce0487d60ab0efa45ef206ebbdfd29053c232b4c0fdce1594016531340c1603695b37f17deb1639dcb98078a9629eeb36c835a19f4180834ce + checksum: 10/e8f5f13d77619f0e2b83907fa2a4e80f9e1ed18aeba0cfb2dcafe4d505ed4dd811a1b508ca752a4fd3782f8e5cf651a9daea0cb17d57e9159f915042b94b867d languageName: node linkType: hard @@ -4473,13 +4477,13 @@ __metadata: languageName: node linkType: hard -"@ledgerhq/types-live@npm:^6.52.0": - version: 6.52.0 - resolution: "@ledgerhq/types-live@npm:6.52.0" +"@ledgerhq/types-live@npm:^6.56.0": + version: 6.56.0 + resolution: "@ledgerhq/types-live@npm:6.56.0" dependencies: bignumber.js: "npm:^9.1.2" rxjs: "npm:^7.8.1" - checksum: 10/c410f02159538d66f59956512fc5bab2cb17edee7f6a15a517c31d89d6c730e52691666bb2e1d98718c701e94306dd7498544ea3d7772ff0b5ad6522fb2c335c + checksum: 10/a3cdf2acc6b4fa41aa34993f8790d44aa4fa937378b0bce29a69889b43e5229662803530b948206fe9fe02498d25058e71db2b14f22dc53445df7f53e547c308 languageName: node linkType: hard @@ -5334,17 +5338,17 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-ledger-bridge-keyring@npm:^8.0.2": - version: 8.0.2 - resolution: "@metamask/eth-ledger-bridge-keyring@npm:8.0.2" +"@metamask/eth-ledger-bridge-keyring@npm:^8.0.3": + version: 8.0.3 + resolution: "@metamask/eth-ledger-bridge-keyring@npm:8.0.3" dependencies: "@ethereumjs/rlp": "npm:^5.0.2" "@ethereumjs/tx": "npm:^4.2.0" "@ethereumjs/util": "npm:^8.1.0" - "@ledgerhq/hw-app-eth": "npm:^6.39.0" + "@ledgerhq/hw-app-eth": "npm:^6.42.0" "@metamask/eth-sig-util": "npm:^8.1.2" hdkey: "npm:^2.1.0" - checksum: 10/702d833a1a3a702d128b831f5cba157b14c414fdf0e9a6796e9f0cb866ea71da8673fb46494608cd05044387bc4bd99dbec0ac7bd98f24c2b11b61298288cae8 + checksum: 10/5b5c9f72eec882638985b11198350ace3647fa0ec92facbac3a9c1a67543a8270017c583d2d1464e2ec96cb93ff8b64509c0c8ebc395f8ce7de5ffd8f483ca63 languageName: node linkType: hard @@ -19015,7 +19019,7 @@ __metadata: languageName: node linkType: hard -"ethers@npm:5.7.2, ethers@npm:^5.7.0": +"ethers@npm:^5.7.0": version: 5.7.2 resolution: "ethers@npm:5.7.2" dependencies: @@ -26695,7 +26699,7 @@ __metadata: "@metamask/eth-json-rpc-filters": "npm:^9.0.0" "@metamask/eth-json-rpc-middleware": "npm:^15.1.2" "@metamask/eth-json-rpc-provider": "npm:^4.1.6" - "@metamask/eth-ledger-bridge-keyring": "npm:^8.0.2" + "@metamask/eth-ledger-bridge-keyring": "npm:^8.0.3" "@metamask/eth-sig-util": "npm:^7.0.1" "@metamask/eth-snap-keyring": "npm:^8.1.1" "@metamask/eth-token-tracker": "npm:^10.0.2"