File tree Expand file tree Collapse file tree 4 files changed +4
-64
lines changed
packages/multichain-account-service Expand file tree Collapse file tree 4 files changed +4
-64
lines changed Original file line number Diff line number Diff line change 64
64
"@metamask/providers" : " ^22.1.0" ,
65
65
"@metamask/snaps-controllers" : " ^14.0.1" ,
66
66
"@types/jest" : " ^27.4.1" ,
67
- "@types/uuid" : " ^8.3.0" ,
68
67
"deepmerge" : " ^4.2.2" ,
69
68
"jest" : " ^27.5.1" ,
70
69
"ts-jest" : " ^27.1.4" ,
71
70
"typedoc" : " ^0.24.8" ,
72
71
"typedoc-plugin-missing-exports" : " ^2.0.0" ,
73
72
"typescript" : " ~5.2.2" ,
74
- "uuid" : " ^8.3.2" ,
75
73
"webextension-polyfill" : " ^0.12.0"
76
74
},
77
75
"peerDependencies" : {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import {
10
10
} from '@metamask/keyring-api' ;
11
11
import { KeyringTypes } from '@metamask/keyring-controller' ;
12
12
import type { InternalAccount } from '@metamask/keyring-internal-api' ;
13
- import { v4 as uuid } from 'uuid' ;
14
13
15
14
import { isBip44Account } from '../providers/BaseAccountProvider' ;
16
15
@@ -171,31 +170,17 @@ export class MockAccountBuilder {
171
170
return new MockAccountBuilder ( account ) ;
172
171
}
173
172
174
- withUuid ( ) {
175
- this . #account. id = uuid ( ) ;
176
- return this ;
177
- }
178
-
179
- withAddressSuffix ( suffix : string ) {
180
- this . #account. address += suffix ;
181
- return this ;
182
- }
183
-
184
173
withEntropySource ( entropySource : EntropySourceId ) {
185
- if ( ! isBip44Account ( this . #account) ) {
186
- throw new Error ( 'Invalid BIP-44 account' ) ;
174
+ if ( isBip44Account ( this . #account) ) {
175
+ this . #account . options . entropy . id = entropySource ;
187
176
}
188
-
189
- this . #account. options . entropy . id = entropySource ;
190
177
return this ;
191
178
}
192
179
193
180
withGroupIndex ( groupIndex : number ) {
194
- if ( ! isBip44Account ( this . #account) ) {
195
- throw new Error ( 'Invalid BIP-44 account' ) ;
181
+ if ( isBip44Account ( this . #account) ) {
182
+ this . #account . options . entropy . groupIndex = groupIndex ;
196
183
}
197
-
198
- this . #account. options . entropy . groupIndex = groupIndex ;
199
184
return this ;
200
185
}
201
186
Original file line number Diff line number Diff line change @@ -3826,14 +3826,12 @@ __metadata:
3826
3826
"@metamask/snaps-utils": "npm:^11.0.0"
3827
3827
"@metamask/superstruct": "npm:^3.1.0"
3828
3828
"@types/jest": "npm:^27.4.1"
3829
- "@types/uuid": "npm:^8.3.0"
3830
3829
deepmerge: "npm:^4.2.2"
3831
3830
jest: "npm:^27.5.1"
3832
3831
ts-jest: "npm:^27.1.4"
3833
3832
typedoc: "npm:^0.24.8"
3834
3833
typedoc-plugin-missing-exports: "npm:^2.0.0"
3835
3834
typescript: "npm:~5.2.2"
3836
- uuid: "npm:^8.3.2"
3837
3835
webextension-polyfill: "npm:^0.12.0"
3838
3836
peerDependencies:
3839
3837
"@metamask/accounts-controller": ^31.0.0
You can’t perform that action at this time.
0 commit comments