@@ -22,18 +22,13 @@ import type {
2222} from '@metamask/snaps-sdk/jsx' ;
2323import { isJSXElementUnsafe } from '@metamask/snaps-sdk/jsx' ;
2424import {
25+ createAddressList ,
2526 getJsonSizeUnsafe ,
2627 getJsxChildren ,
2728 getJsxElementFromComponent ,
2829 walkJsx ,
2930} 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' ;
3732
3833type GetSelectedAccount = ( ) => InternalAccount | undefined ;
3934type GetAccountByAddress = (
@@ -70,23 +65,6 @@ export function assertNameIsUnique(state: InterfaceState, name: string) {
7065 ) ;
7166}
7267
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-
9068/**
9169 * Construct default state for a component.
9270 *
0 commit comments