From 0ee499f8fa10216588f6b62321028de8027b82be Mon Sep 17 00:00:00 2001 From: Daniel Rocha <68558152+danroc@users.noreply.github.com> Date: Wed, 29 May 2024 16:22:44 +0200 Subject: [PATCH] fix: export `Caip*` types used in the API --- src/{utils => api}/caip.test.ts | 0 src/{utils => api}/caip.ts | 0 src/api/index.ts | 1 + src/api/keyring.ts | 2 +- src/internal/api.ts | 3 ++- src/utils/index.ts | 1 - 6 files changed, 4 insertions(+), 3 deletions(-) rename src/{utils => api}/caip.test.ts (100%) rename src/{utils => api}/caip.ts (100%) diff --git a/src/utils/caip.test.ts b/src/api/caip.test.ts similarity index 100% rename from src/utils/caip.test.ts rename to src/api/caip.test.ts diff --git a/src/utils/caip.ts b/src/api/caip.ts similarity index 100% rename from src/utils/caip.ts rename to src/api/caip.ts diff --git a/src/api/index.ts b/src/api/index.ts index c0c60a360..2f0ab53bd 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,5 +1,6 @@ export * from './account'; export * from './balance'; +export * from './caip'; export * from './export'; export * from './keyring'; export * from './request'; diff --git a/src/api/keyring.ts b/src/api/keyring.ts index ad1274f60..5952ab145 100644 --- a/src/api/keyring.ts +++ b/src/api/keyring.ts @@ -1,8 +1,8 @@ import type { Json } from '@metamask/utils'; -import type { CaipAssetType } from '../utils'; import type { KeyringAccount } from './account'; import type { Balance } from './balance'; +import type { CaipAssetType } from './caip'; import type { KeyringAccountData } from './export'; import type { KeyringRequest } from './request'; import type { KeyringResponse } from './response'; diff --git a/src/internal/api.ts b/src/internal/api.ts index 7fc3f8e00..fdefb4470 100644 --- a/src/internal/api.ts +++ b/src/internal/api.ts @@ -4,13 +4,14 @@ import { array, literal, number, record, string, union } from 'superstruct'; import { BalanceStruct, + CaipAssetTypeStruct, KeyringAccountDataStruct, KeyringAccountStruct, KeyringRequestStruct, KeyringResponseStruct, } from '../api'; import { object } from '../superstruct'; -import { CaipAssetTypeStruct, UuidStruct } from '../utils'; +import { UuidStruct } from '../utils'; import { KeyringRpcMethod } from './rpc'; const CommonHeader = { diff --git a/src/utils/index.ts b/src/utils/index.ts index 1a3d7c47b..8043a4ee6 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,3 +1,2 @@ -export * from './caip'; export * from './types'; export * from './typing';