From c36d41f51d57fa42f0261369cebd41bb85ca1f49 Mon Sep 17 00:00:00 2001 From: Vladimir Babin Date: Sat, 10 Aug 2024 12:48:21 +0300 Subject: [PATCH] Move nft-related things from models to helpers --- src/bot/features/admin/collection.ts | 2 +- src/bot/features/admin/queue.ts | 4 ++-- src/bot/{models => helpers}/nft-collection.ts | 2 +- src/bot/{models => helpers}/nft-item.ts | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) rename src/bot/{models => helpers}/nft-collection.ts (98%) rename src/bot/{models => helpers}/nft-item.ts (93%) diff --git a/src/bot/features/admin/collection.ts b/src/bot/features/admin/collection.ts index 2b1773f..fc1cc4d 100644 --- a/src/bot/features/admin/collection.ts +++ b/src/bot/features/admin/collection.ts @@ -1,7 +1,7 @@ import { Composer } from "grammy" import type { Context } from "#root/bot/context.js" import { logHandle } from "#root/bot/helpers/logging.js" -import { NftCollection } from "#root/bot/models/nft-collection.js" +import { NftCollection } from "#root/bot/helpers/nft-collection.js" import { config } from "#root/config.js" import { chatAction } from "@grammyjs/auto-chat-action" import { openWallet, waitSeqno } from "#root/bot/helpers/ton.js" diff --git a/src/bot/features/admin/queue.ts b/src/bot/features/admin/queue.ts index 940bd53..5d3df71 100644 --- a/src/bot/features/admin/queue.ts +++ b/src/bot/features/admin/queue.ts @@ -13,8 +13,8 @@ import { Address, toNano } from "@ton/core" import { PhotoSize } from "@grammyjs/types" import { changeImageData } from "#root/bot/callback-data/image-selection.js" import { SelectImageButton, photoKeyboard } from "#root/bot/keyboards/photo.js" -import { NftCollection } from "#root/bot/models/nft-collection.js" -import { NFTMintParameters, NftItem } from "#root/bot/models/nft-item.js" +import { NftCollection } from "#root/bot/helpers/nft-collection.js" +import { NFTMintParameters, NftItem } from "#root/bot/helpers/nft-item.js" import { pinImageURLToIPFS, pinJSONToIPFS, diff --git a/src/bot/models/nft-collection.ts b/src/bot/helpers/nft-collection.ts similarity index 98% rename from src/bot/models/nft-collection.ts rename to src/bot/helpers/nft-collection.ts index f8b9b1c..5a20ce8 100644 --- a/src/bot/models/nft-collection.ts +++ b/src/bot/helpers/nft-collection.ts @@ -14,7 +14,7 @@ import { } from "#root/bot/helpers/ton.js" import { config } from "#root/config.js" import { logger } from "#root/logger" -import { OpenedWallet } from "../helpers/wallet" +import { OpenedWallet } from "#root/bot/helpers/wallet.js" export type collectionData = { ownerAddress: Address diff --git a/src/bot/models/nft-item.ts b/src/bot/helpers/nft-item.ts similarity index 93% rename from src/bot/models/nft-item.ts rename to src/bot/helpers/nft-item.ts index 22cd2cf..cb3d12f 100644 --- a/src/bot/models/nft-item.ts +++ b/src/bot/helpers/nft-item.ts @@ -2,9 +2,9 @@ import { Address, beginCell, Cell, internal, SendMode, toNano } from "@ton/core" import { OpenedWallet } from "#root/bot/helpers/wallet.js" import { config } from "#root/config.js" -import { logger } from "#root/logger" -import { openWallet, sleep, waitSeqno } from "../helpers/ton" -import { NftCollection } from "./nft-collection" +import { logger } from "#root/logger.js" +import { NftCollection } from "#root/bot/helpers/nft-collection.js" +import { openWallet, sleep, waitSeqno } from "#root/bot/helpers/ton.js" export type NFTMintParameters = { queryId: number