From 1f6fa1e34bc9e10a6bc2444ab9d8a58e78130caf Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Tue, 20 Jun 2023 22:32:53 +0300 Subject: [PATCH 1/2] Update mint price calculation for open edition collections --- components/openEdition/MintingDetails.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/openEdition/MintingDetails.tsx b/components/openEdition/MintingDetails.tsx index 8b6acd5..5ce5c25 100644 --- a/components/openEdition/MintingDetails.tsx +++ b/components/openEdition/MintingDetails.tsx @@ -67,11 +67,7 @@ export const MintingDetails = ({ onChange, uploadMethod, minimumMintPrice }: Min useEffect(() => { const data: MintingDetailsDataProps = { - unitPrice: unitPriceState.value - ? (Number(unitPriceState.value) * 1_000_000).toString() - : unitPriceState.value === 0 - ? '0' - : '', + unitPrice: unitPriceState.value ? Number(unitPriceState.value).toString() : unitPriceState.value === 0 ? '0' : '', perAddressLimit: perAddressLimitState.value, startTime: timestamp ? (timestamp.getTime() * 1_000_000).toString() : '', endTime: endTimestamp ? (endTimestamp.getTime() * 1_000_000).toString() : '', From dc635ff3a226e39da2c3a5c5751f887310f7feea Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Tue, 20 Jun 2023 22:50:16 +0300 Subject: [PATCH 2/2] Revert and move the previous change --- components/openEdition/MintingDetails.tsx | 6 +++++- components/openEdition/OpenEditionMinterCreator.tsx | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/openEdition/MintingDetails.tsx b/components/openEdition/MintingDetails.tsx index 5ce5c25..8b6acd5 100644 --- a/components/openEdition/MintingDetails.tsx +++ b/components/openEdition/MintingDetails.tsx @@ -67,7 +67,11 @@ export const MintingDetails = ({ onChange, uploadMethod, minimumMintPrice }: Min useEffect(() => { const data: MintingDetailsDataProps = { - unitPrice: unitPriceState.value ? Number(unitPriceState.value).toString() : unitPriceState.value === 0 ? '0' : '', + unitPrice: unitPriceState.value + ? (Number(unitPriceState.value) * 1_000_000).toString() + : unitPriceState.value === 0 + ? '0' + : '', perAddressLimit: perAddressLimitState.value, startTime: timestamp ? (timestamp.getTime() * 1_000_000).toString() : '', endTime: endTimestamp ? (endTimestamp.getTime() * 1_000_000).toString() : '', diff --git a/components/openEdition/OpenEditionMinterCreator.tsx b/components/openEdition/OpenEditionMinterCreator.tsx index a104bf7..155f563 100644 --- a/components/openEdition/OpenEditionMinterCreator.tsx +++ b/components/openEdition/OpenEditionMinterCreator.tsx @@ -500,7 +500,7 @@ export const OpenEditionMinterCreator = ({ start_time: mintingDetails?.startTime, end_time: mintingDetails?.endTime, mint_price: { - amount: (Number(mintingDetails?.unitPrice) * 1000000).toString(), + amount: Number(mintingDetails?.unitPrice).toString(), denom: 'ustars', }, per_address_limit: mintingDetails?.perAddressLimit,