Skip to content

Commit

Permalink
Prevent create new collection if already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
chiliec committed Mar 14, 2024
1 parent 2a0be0d commit 097a78c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NODE_ENV=development
BOT_MODE=polling
LOG_LEVEL=debug
BOT_TOKEN=123:ABCABCD
MONGO=mongodb://localhost:27017/nft-bot?retryWrites=true&w=majority
Expand Down
3 changes: 3 additions & 0 deletions src/bot/features/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ feature.command(
logHandle("command-collection"),
chatAction("upload_document"),
async (ctx) => {
if (config.COLLECTION_ADDRESS) {
return ctx.reply("Collection already deployed!");
}
const wallet = await openWallet(config.MNEMONICS!.split(" "));
const collectionData = {
ownerAddress: wallet.contract.address,
Expand Down

0 comments on commit 097a78c

Please sign in to comment.