Skip to content

Commit

Permalink
chore: use resolutions to test ts-bridge with some accounts packages
Browse files Browse the repository at this point in the history
  • Loading branch information
ccharly committed Nov 14, 2024
1 parent b7c3f83 commit 33d1baf
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 39 deletions.
4 changes: 2 additions & 2 deletions app/scripts/metamask-controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@ describe('MetaMaskController', () => {
...mockEvmAccount,
id: '21690786-6abd-45d8-a9f0-9ff1d8ca76a1',
type: BtcAccountType.P2wpkh,
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
address: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq',
};

Expand Down Expand Up @@ -2524,7 +2524,7 @@ describe('MetaMaskController', () => {
...mockEvmAccount,
id: '21690786-6abd-45d8-a9f0-9ff1d8ca76a1',
type: BtcAccountType.P2wpkh,
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
address: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq',
// We need to have a "Snap account" account here, since the MultichainBalancesController will
// filter it out otherwise!
Expand Down
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,15 @@
"@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/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",
"@metamask/keyring-api@^8.1.3": "npm:@metamask-previews/[email protected]",
"@metamask/keyring-api@^8.0.0": "npm:@metamask-previews/[email protected]",
"@metamask/keyring-api@^9.0.0": "npm:@metamask-previews/[email protected]",
"@metamask/keyring-api@^10.1.0": "npm:@metamask-previews/[email protected]",
"@metamask/[email protected]": "npm:@metamask-previews/[email protected]",
"@metamask/eth-snap-keyring@^4.4.0": "npm:@metamask-previews/[email protected]",
"@metamask/eth-snap-keyring@^4.3.1": "npm:@metamask-previews/[email protected]",
"@metamask/eth-snap-keyring@^4.3.6": "npm:@metamask-previews/[email protected]"
},
"dependencies": {
"@babel/runtime": "patch:@babel/runtime@npm%3A7.25.9#~/.yarn/patches/@babel-runtime-npm-7.25.9-fe8c62510a.patch",
Expand Down
4 changes: 2 additions & 2 deletions test/data/mock-accounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const MOCK_ACCOUNT_BIP122_P2WPKH: InternalAccount = {
id: 'ae247df6-3911-47f7-9e36-28e6a7d96078',
address: 'bc1qwl8399fz829uqvqly9tcatgrgtwp3udnhxfq4k',
options: {},
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
type: BtcAccountType.P2wpkh,
metadata: {
name: 'Bitcoin Account',
Expand All @@ -56,7 +56,7 @@ export const MOCK_ACCOUNT_BIP122_P2WPKH_TESTNET: InternalAccount = {
id: 'fcdafe8b-4bdf-4e25-9051-e255b2a0af5f',
address: 'tb1q6rmsq3vlfdhjdhtkxlqtuhhlr6pmj09y6w43g8',
options: {},
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
type: BtcAccountType.P2wpkh,
metadata: {
name: 'Bitcoin Testnet Account',
Expand Down
2 changes: 1 addition & 1 deletion test/jest/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export function createMockInternalAccount({
];
break;
case BtcAccountType.P2wpkh:
methods = [BtcMethod.SendMany];
methods = [BtcMethod.SendBitcoin];
break;
default:
throw new Error(`Unknown account type: ${type}`);
Expand Down
2 changes: 1 addition & 1 deletion ui/components/app/wallet-overview/btc-overview.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const mockNonEvmAccount = {
},
},
options: {},
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
type: BtcAccountType.P2wpkh,
};

Expand Down
4 changes: 2 additions & 2 deletions ui/components/ui/account-list/account-list.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const mockNonEvmAccount = {
address: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq',
name: 'BTC Account',
type: BtcAccountType.P2wpkh,
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
}),
addressLabel: 'BTC Account',
balance: '1',
Expand Down Expand Up @@ -109,7 +109,7 @@ describe('AccountList', () => {
},
},
options: {},
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
type: BtcAccountType.P2wpkh,
address: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq',
},
Expand Down
2 changes: 1 addition & 1 deletion ui/helpers/utils/permissions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const mockNonEvmAccount = {
...mockAccount,
id: '4b94987c-165c-4287-bbc6-bee9c440e82a',
type: BtcAccountType.P2wpkh,
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
address: 'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq',
};

Expand Down
2 changes: 1 addition & 1 deletion ui/hooks/accounts/useMultichainWalletSnapClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('useMultichainWalletSnapClient', () => {
address: 'tb1q2hjrlnf8kmtt5dj6e49gqzy6jnpe0sj7ty50cl',
id: '11a33c6b-0d46-43f4-a401-01587d575fd0',
options: {},
methods: [BtcMethod.SendMany],
methods: [BtcMethod.SendBitcoin],
type: BtcAccountType.P2wpkh,
},
},
Expand Down
39 changes: 11 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5439,22 +5439,21 @@ __metadata:
languageName: node
linkType: hard

"@metamask/eth-snap-keyring@npm:^4.3.1, @metamask/eth-snap-keyring@npm:^4.3.6, @metamask/eth-snap-keyring@npm:^4.4.0":
version: 4.4.0
resolution: "@metamask/eth-snap-keyring@npm:4.4.0"
"@metamask/eth-snap-keyring@npm:@metamask-previews/eth-snap-keyring@5.0.1-3416820":
version: 5.0.1-3416820
resolution: "@metamask-previews/eth-snap-keyring@npm:5.0.1-3416820"
dependencies:
"@ethereumjs/tx": "npm:^4.2.0"
"@metamask/eth-sig-util": "npm:^7.0.3"
"@metamask/eth-sig-util": "npm:^8.0.0"
"@metamask/keyring-api": "npm:10.1.0"
"@metamask/snaps-controllers": "npm:^9.10.0"
"@metamask/snaps-sdk": "npm:^6.7.0"
"@metamask/snaps-utils": "npm:^8.3.0"
"@metamask/superstruct": "npm:^3.1.0"
"@metamask/utils": "npm:^9.2.1"
"@types/uuid": "npm:^9.0.8"
uuid: "npm:^9.0.1"
peerDependencies:
"@metamask/keyring-api": ^8.1.3
checksum: 10/fd9926ba3706506bd9a16d1c2501e7c6cd7b7e3e7ea332bc7f28e0fca1f67f4514da51e6f9f4541a7354a2363d04c09c445f61b98fdc366432e1def9c2f27d07
checksum: 10/2d51f239ea07e70936b9bc2455587c907d1e33087ad74129c91aaface5f8cda2a18d433316c4d219fdab93b58a051cfdb38a24c5eb4d0d312d14a30514f92ca8
languageName: node
linkType: hard

Expand Down Expand Up @@ -5722,25 +5721,9 @@ __metadata:
languageName: node
linkType: hard

"@metamask/keyring-api@npm:^8.0.0, @metamask/keyring-api@npm:^8.1.3":
version: 8.1.3
resolution: "@metamask/keyring-api@npm:8.1.3"
dependencies:
"@metamask/snaps-sdk": "npm:^6.5.1"
"@metamask/superstruct": "npm:^3.1.0"
"@metamask/utils": "npm:^9.2.1"
"@types/uuid": "npm:^9.0.8"
bech32: "npm:^2.0.0"
uuid: "npm:^9.0.1"
peerDependencies:
"@metamask/providers": ^17.2.0
checksum: 10/9857b6286760d22b1b7102ea8bdf03ebf56c71e9f0adee19a2230def6b7a9230561c1a3bfcb308735b79ab9a5afa9afd07a1617c1d165f63d193cd6a6b6e7a15
languageName: node
linkType: hard

"@metamask/keyring-api@npm:^9.0.0":
version: 9.0.0
resolution: "@metamask/keyring-api@npm:9.0.0"
"@metamask/keyring-api@npm:@metamask-previews/[email protected]":
version: 10.1.0-3416820
resolution: "@metamask-previews/keyring-api@npm:10.1.0-3416820"
dependencies:
"@metamask/snaps-sdk": "npm:^6.7.0"
"@metamask/superstruct": "npm:^3.1.0"
Expand All @@ -5750,8 +5733,8 @@ __metadata:
uuid: "npm:^9.0.1"
webextension-polyfill: "npm:^0.12.0"
peerDependencies:
"@metamask/providers": ^17.2.0
checksum: 10/ff552c04a4d06c7b1a43d52809a9c141d38772586388f0ab96123bce445f148aa7f7e8165d03fa92ac391351de252c4b299fc2c16e690193f669b5329941fe75
"@metamask/providers": ^18.1.0
checksum: 10/d78d20849df01ef44c8701ce7494678ef0c810f4b42cea8ea3cf5e70615bc33664a9978b6e59278bb31fd03a82698a9f0679e325b877331638d460f5213e4bc2
languageName: node
linkType: hard

Expand Down

0 comments on commit 33d1baf

Please sign in to comment.