@@ -22,18 +22,13 @@ import type {
22
22
} from '@metamask/snaps-sdk/jsx' ;
23
23
import { isJSXElementUnsafe } from '@metamask/snaps-sdk/jsx' ;
24
24
import {
25
+ createAddressList ,
25
26
getJsonSizeUnsafe ,
26
27
getJsxChildren ,
27
28
getJsxElementFromComponent ,
28
29
walkJsx ,
29
30
} from '@metamask/snaps-utils' ;
30
- import type { CaipAccountId , CaipChainId } from '@metamask/utils' ;
31
- import {
32
- parseCaipAccountId ,
33
- parseCaipChainId ,
34
- toCaipAccountId ,
35
- type CaipAccountAddress ,
36
- } from '@metamask/utils' ;
31
+ import { parseCaipAccountId , type CaipAccountAddress } from '@metamask/utils' ;
37
32
38
33
type GetSelectedAccount = ( ) => InternalAccount | undefined ;
39
34
type GetAccountByAddress = (
@@ -70,23 +65,6 @@ export function assertNameIsUnique(state: InterfaceState, name: string) {
70
65
) ;
71
66
}
72
67
73
- /**
74
- * Create a list of CAIP account IDs from an address and a list of scopes.
75
- *
76
- * @param address - The address to create the account IDs from.
77
- * @param scopes - The scopes to create the account IDs from.
78
- * @returns The list of CAIP account IDs.
79
- */
80
- export function createAddressList (
81
- address : string ,
82
- scopes : CaipChainId [ ] ,
83
- ) : CaipAccountId [ ] {
84
- return scopes . map ( ( scope ) => {
85
- const { namespace, reference } = parseCaipChainId ( scope ) ;
86
- return toCaipAccountId ( namespace , reference , address ) ;
87
- } ) ;
88
- }
89
-
90
68
/**
91
69
* Construct default state for a component.
92
70
*
0 commit comments