Skip to content

Commit

Permalink
refactor: BtcMethod.SendMany -> BtcMethod.SendBitcoin
Browse files Browse the repository at this point in the history
  • Loading branch information
ccharly committed Nov 19, 2024
1 parent ffd5df4 commit a33cb9b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 11 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 @@ -2307,7 +2307,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 @@ -2415,7 +2415,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 lavamoat/build-system/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,8 @@
"chokidar>normalize-path": true,
"chokidar>readdirp": true,
"del>is-glob": true,
"eslint>glob-parent": true
"eslint>glob-parent": true,
"tsx>fsevents": true
}
},
"chokidar>anymatch": {
Expand Down Expand Up @@ -8767,6 +8768,13 @@
"typescript": true
}
},
"tsx>fsevents": {
"globals": {
"console.assert": true,
"process.platform": true
},
"native": true
},
"typescript": {
"builtin": {
"buffer.Buffer": true,
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 @@ -59,7 +59,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

0 comments on commit a33cb9b

Please sign in to comment.