From 119e7039971fd81cdff790deb7d420bfd82ab5a6 Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Fri, 7 Apr 2023 12:28:19 +0300 Subject: [PATCH] Update checks for minimum mint price for Whitelists --- components/collections/creation/WhitelistDetails.tsx | 2 +- pages/collections/create.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/collections/creation/WhitelistDetails.tsx b/components/collections/creation/WhitelistDetails.tsx index 1418aa0..66fde9e 100644 --- a/components/collections/creation/WhitelistDetails.tsx +++ b/components/collections/creation/WhitelistDetails.tsx @@ -49,7 +49,7 @@ export const WhitelistDetails = ({ onChange }: WhitelistDetailsProps) => { id: 'unit-price', name: 'unitPrice', title: 'Unit Price', - subtitle: 'Token price for whitelisted addresses \n (min. 25 STARS)', + subtitle: 'Token price for whitelisted addresses \n (min. 0 STARS)', placeholder: '25', }) diff --git a/pages/collections/create.tsx b/pages/collections/create.tsx index fe8e4ea..54b67a4 100644 --- a/pages/collections/create.tsx +++ b/pages/collections/create.tsx @@ -855,8 +855,8 @@ const CollectionCreationPage: NextPage = () => { } else if (whitelistDetails.whitelistType === 'new') { if (whitelistDetails.members?.length === 0) throw new Error('Whitelist member list cannot be empty') if (whitelistDetails.unitPrice === '') throw new Error('Whitelist unit price is required') - if (Number(whitelistDetails.unitPrice) < 25000000) - throw new Error('Invalid unit price: The minimum unit price for whitelisted addresses is 25 STARS') + if (Number(whitelistDetails.unitPrice) < 0) + throw new Error('Invalid unit price: The unit price cannot be negative') if (whitelistDetails.startTime === '') throw new Error('Start time is required') if (whitelistDetails.endTime === '') throw new Error('End time is required') if (!whitelistDetails.perAddressLimit || whitelistDetails.perAddressLimit === 0)