From 3621a7363e3f2ea4bb95d1c26856a8b01077f3cd Mon Sep 17 00:00:00 2001 From: Serkan Reis Date: Tue, 1 Aug 2023 11:26:24 +0300 Subject: [PATCH] Add mint denom selection for standard collections --- .../collections/creation/MintingDetails.tsx | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/components/collections/creation/MintingDetails.tsx b/components/collections/creation/MintingDetails.tsx index 6ca136e..e6555f1 100644 --- a/components/collections/creation/MintingDetails.tsx +++ b/components/collections/creation/MintingDetails.tsx @@ -4,6 +4,9 @@ import { FormControl } from 'components/FormControl' import { FormGroup } from 'components/FormGroup' import { useInputState, useNumberInputState } from 'components/forms/FormInput.hooks' import { InputDateTime } from 'components/InputDateTime' +import { vendingMinterList } from 'config/minter' +import type { TokenInfo } from 'config/token' +import { stars, tokensList } from 'config/token' import React, { useEffect, useState } from 'react' import { resolveAddress } from 'utils/resolveAddress' @@ -24,12 +27,14 @@ export interface MintingDetailsDataProps { perAddressLimit: number startTime: string paymentAddress?: string + selectedMintToken?: TokenInfo } export const MintingDetails = ({ onChange, numberOfTokens, uploadMethod, minimumMintPrice }: MintingDetailsProps) => { const wallet = useWallet() const [timestamp, setTimestamp] = useState() + const [selectedMintToken, setSelectedMintToken] = useState(stars) const numberOfTokensState = useNumberInputState({ id: 'numberoftokens', @@ -85,6 +90,7 @@ export const MintingDetails = ({ onChange, numberOfTokens, uploadMethod, minimum perAddressLimit: perAddressLimitState.value, startTime: timestamp ? (timestamp.getTime() * 1_000_000).toString() : '', paymentAddress: paymentAddressState.value.trim(), + selectedMintToken, } onChange(data) // eslint-disable-next-line react-hooks/exhaustive-deps @@ -95,6 +101,7 @@ export const MintingDetails = ({ onChange, numberOfTokens, uploadMethod, minimum perAddressLimitState.value, timestamp, paymentAddressState.value, + selectedMintToken, ]) return ( @@ -106,7 +113,22 @@ export const MintingDetails = ({ onChange, numberOfTokens, uploadMethod, minimum isRequired value={uploadMethod === 'new' ? numberOfTokens : numberOfTokensState.value} /> - +
+ + +
+ setTimestamp(date)} value={timestamp} />