Skip to content

Commit 52d1c9a

Browse files
committed
fix: apply v2 values
1 parent 39d0ab8 commit 52d1c9a

11 files changed

Lines changed: 17 additions & 17 deletions

File tree

packages/snaps-controllers/src/multichain/MultichainRoutingService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type SnapKeyring = {
3838
}) => Promise<Json>;
3939
};
4040

41-
// Expecting a bound function that calls KeyringController.withKeyringV2Unsafe selecting the Snap keyring
41+
// Expecting a bound function that calls KeyringController.withKeyring selecting the Snap keyring
4242
export type WithSnapKeyringFunction = <ReturnType>(
4343
operation: ({ keyring }: { keyring: SnapKeyring }) => Promise<ReturnType>,
4444
) => Promise<ReturnType>;

packages/snaps-rpc-methods/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12-
- Update `withKeyring` to `withKeyringV2Unsafe` ([#4009](https://github.com/MetaMask/snaps/pull/4009))
12+
- **BREAKING:** Use `withKeyringV2Unsafe` for accessing entropy ([#4009](https://github.com/MetaMask/snaps/pull/4009))
1313

1414
## [16.0.0]
1515

packages/snaps-rpc-methods/src/restricted/getBip32Entropy.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('getBip32EntropyImplementation', () => {
7979
async (_selector, operation) =>
8080
operation({
8181
keyring: {
82-
type: 'HD Key Tree',
82+
type: 'hd',
8383
mnemonic: TEST_SECRET_RECOVERY_PHRASE_BYTES,
8484
seed: TEST_SECRET_RECOVERY_PHRASE_SEED_BYTES,
8585
},
@@ -345,7 +345,7 @@ describe('getBip32EntropyImplementation', () => {
345345
async (_selector, operation) =>
346346
operation({
347347
keyring: {
348-
type: 'HD Key Tree',
348+
type: 'hd',
349349
},
350350
}),
351351
);
@@ -375,7 +375,7 @@ describe('getBip32EntropyImplementation', () => {
375375
async (_selector, operation) =>
376376
operation({
377377
keyring: {
378-
type: 'HD Key Tree',
378+
type: 'hd',
379379
},
380380
}),
381381
);
@@ -405,7 +405,7 @@ describe('getBip32EntropyImplementation', () => {
405405
async (_selector, operation) =>
406406
operation({
407407
keyring: {
408-
type: 'HD Key Tree',
408+
type: 'hd',
409409
},
410410
}),
411411
);
@@ -439,7 +439,7 @@ describe('getBip32EntropyImplementation', () => {
439439
async (_selector, operation) =>
440440
operation({
441441
keyring: {
442-
type: 'HD Key Tree',
442+
type: 'hd',
443443
},
444444
}),
445445
);

packages/snaps-rpc-methods/src/restricted/getBip32PublicKey.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('getBip32PublicKeyImplementation', () => {
7979
async (_selector, operation) =>
8080
operation({
8181
keyring: {
82-
type: 'HD Key Tree',
82+
type: 'hd',
8383
mnemonic: TEST_SECRET_RECOVERY_PHRASE_BYTES,
8484
seed: TEST_SECRET_RECOVERY_PHRASE_SEED_BYTES,
8585
},

packages/snaps-rpc-methods/src/restricted/getBip44Entropy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('getBip44EntropyImplementation', () => {
7878
async (_selector, operation) =>
7979
operation({
8080
keyring: {
81-
type: 'HD Key Tree',
81+
type: 'hd',
8282
seed: TEST_SECRET_RECOVERY_PHRASE_SEED_BYTES,
8383
},
8484
}),

packages/snaps-rpc-methods/src/restricted/getEntropy.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe('getEntropyImplementation', () => {
5959
async (_selector, operation) =>
6060
operation({
6161
keyring: {
62-
type: 'HD Key Tree',
62+
type: 'hd',
6363
seed: TEST_SECRET_RECOVERY_PHRASE_SEED_BYTES,
6464
},
6565
}),

packages/snaps-rpc-methods/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type JsonRpcRequestWithOrigin<
2323
> = JsonRpcRequest<Params> & { origin: string };
2424

2525
export type HdKeyring = {
26-
type: 'HD Key Tree';
26+
type: 'hd';
2727
seed?: Uint8Array;
2828
mnemonic?: Uint8Array;
2929
};

packages/snaps-rpc-methods/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ export const UI_PERMISSIONS = [
352352
SnapEndowments.SignatureInsight,
353353
] as const;
354354

355-
export const HD_KEYRING = 'HD Key Tree';
355+
export const HD_KEYRING = 'hd';
356356

357357
/**
358358
* Get the mnemonic for a given entropy source. If no source is

packages/snaps-simulation/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12-
- Update `withKeyring` to `withKeyringV2Unsafe` ([#4009](https://github.com/MetaMask/snaps/pull/4009))
12+
- Use `withKeyringV2Unsafe` for accessing entropy ([#4009](https://github.com/MetaMask/snaps/pull/4009))
1313

1414
## [4.1.4]
1515

packages/snaps-simulation/src/simulation.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,11 +528,11 @@ describe('registerActions', () => {
528528
expect(
529529
await controllerMessenger.call(
530530
'KeyringController:withKeyringV2Unsafe',
531-
{ type: 'HD Key Tree' },
531+
{ type: 'hd' },
532532
({ keyring }) => keyring,
533533
),
534534
).toStrictEqual({
535-
type: 'HD Key Tree',
535+
type: 'hd',
536536
mnemonic: mnemonicPhraseToBytes(DEFAULT_SRP),
537537
seed: await mnemonicToSeed(DEFAULT_SRP),
538538
});
@@ -544,7 +544,7 @@ describe('registerActions', () => {
544544
({ keyring }) => keyring,
545545
),
546546
).toStrictEqual({
547-
type: 'HD Key Tree',
547+
type: 'hd',
548548
mnemonic: mnemonicPhraseToBytes(DEFAULT_ALTERNATIVE_SRP),
549549
seed: await mnemonicToSeed(DEFAULT_ALTERNATIVE_SRP),
550550
});

0 commit comments

Comments
 (0)