From e47b6f47c32bdd6e8fcc647b3add210cb29da287 Mon Sep 17 00:00:00 2001 From: Toms Date: Tue, 28 Jan 2025 02:48:23 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20pr=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/generated/types.ts | 6 ------ src/utils/constants.ts | 6 +++++- src/utils/conversion.ts | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/generated/types.ts b/src/generated/types.ts index be6a6eaf37..ff9f5636d1 100644 --- a/src/generated/types.ts +++ b/src/generated/types.ts @@ -983,9 +983,3 @@ export const TxTags = { stateTrieMigration: StateTrieMigrationTx, electionProviderMultiPhase: ElectionProviderMultiPhaseTx, }; - -export const TX_TAG_VALUES: string[] = Object.values(TxTags) - .map(v => Object.values(v)) - .flat(); - -export const MODULE_NAMES: string[] = Object.values(ModuleName); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 96128426ca..49c158e60f 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -1,7 +1,7 @@ import BigNumber from 'bignumber.js'; import { coerce } from 'semver'; -import { TransactionArgumentType } from '~/types'; +import { ModuleName, TransactionArgumentType, TxTags } from '~/types'; /** * Maximum amount of decimals for on-chain values @@ -178,3 +178,7 @@ export const GLOBAL_TOKEN_URI_NAME = 'tokenUri'; export const GLOBAL_BASE_TOKEN_URI_NAME = 'baseTokenUri'; export const ASSET_ID_PREFIX = 'modlpy/pallet_asset'; + +export const TX_TAG_VALUES: string[] = Object.values(TxTags).flatMap(v => Object.values(v)); + +export const MODULE_NAMES: string[] = Object.values(ModuleName); diff --git a/src/utils/conversion.ts b/src/utils/conversion.ts index 8f928481ec..d8af632941 100644 --- a/src/utils/conversion.ts +++ b/src/utils/conversion.ts @@ -227,7 +227,6 @@ import { MetadataType, MetadataValue, MetadataValueDetails, - MODULE_NAMES, ModuleName, MultiClaimCondition, NftMetadataInput, @@ -275,7 +274,6 @@ import { TransferRestrictionType, TransferStatus, TrustedClaimIssuer, - TX_TAG_VALUES, TxGroup, TxTag, TxTags, @@ -308,6 +306,8 @@ import { MAX_MODULE_LENGTH, MAX_OFF_CHAIN_METADATA_LENGTH, MAX_TICKER_LENGTH, + MODULE_NAMES, + TX_TAG_VALUES, } from '~/utils/constants'; import { asAccount,