Create OpenEditionMinterDetailsDataProps
This commit is contained in:
parent
adeba3e9d3
commit
d5b1acc16e
@ -47,13 +47,24 @@ import { type RoyaltyDetailsDataProps, RoyaltyDetails } from './RoyaltyDetails'
|
|||||||
|
|
||||||
export type MetadataStorageMethod = 'off-chain' | 'on-chain'
|
export type MetadataStorageMethod = 'off-chain' | 'on-chain'
|
||||||
|
|
||||||
|
export interface OpenEditionMinterDetailsDataProps {
|
||||||
|
imageUploadDetails?: ImageUploadDetailsDataProps
|
||||||
|
collectionDetails?: CollectionDetailsDataProps
|
||||||
|
royaltyDetails?: RoyaltyDetailsDataProps
|
||||||
|
onChainMetadataInputDetails?: OnChainMetadataInputDetailsDataProps
|
||||||
|
offChainMetadataUploadDetails?: OffChainMetadataUploadDetailsDataProps
|
||||||
|
mintingDetails?: MintingDetailsDataProps
|
||||||
|
}
|
||||||
|
|
||||||
interface OpenEditionMinterCreatorProps {
|
interface OpenEditionMinterCreatorProps {
|
||||||
onChange: (data: OpenEditionMinterCreatorDataProps) => void
|
onChange: (data: OpenEditionMinterCreatorDataProps) => void
|
||||||
|
onDetailsChange: (data: OpenEditionMinterDetailsDataProps) => void
|
||||||
openEditionMinterUpdatableCreationFee?: string
|
openEditionMinterUpdatableCreationFee?: string
|
||||||
openEditionMinterCreationFee?: string
|
openEditionMinterCreationFee?: string
|
||||||
minimumMintPrice?: string
|
minimumMintPrice?: string
|
||||||
minimumUpdatableMintPrice?: string
|
minimumUpdatableMintPrice?: string
|
||||||
minterType?: MinterType
|
minterType?: MinterType
|
||||||
|
importedOpenEditionMinterDetails?: OpenEditionMinterCreatorDataProps
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OpenEditionMinterCreatorDataProps {
|
export interface OpenEditionMinterCreatorDataProps {
|
||||||
@ -65,6 +76,7 @@ export interface OpenEditionMinterCreatorDataProps {
|
|||||||
|
|
||||||
export const OpenEditionMinterCreator = ({
|
export const OpenEditionMinterCreator = ({
|
||||||
onChange,
|
onChange,
|
||||||
|
onDetailsChange,
|
||||||
openEditionMinterCreationFee,
|
openEditionMinterCreationFee,
|
||||||
openEditionMinterUpdatableCreationFee,
|
openEditionMinterUpdatableCreationFee,
|
||||||
minimumMintPrice,
|
minimumMintPrice,
|
||||||
@ -585,6 +597,26 @@ export const OpenEditionMinterCreator = ({
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [metadataStorageMethod, openEditionMinterContractAddress, sg721ContractAddress, transactionHash])
|
}, [metadataStorageMethod, openEditionMinterContractAddress, sg721ContractAddress, transactionHash])
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const data: OpenEditionMinterDetailsDataProps = {
|
||||||
|
imageUploadDetails: imageUploadDetails ? imageUploadDetails : undefined,
|
||||||
|
collectionDetails: collectionDetails ? collectionDetails : undefined,
|
||||||
|
royaltyDetails: royaltyDetails ? royaltyDetails : undefined,
|
||||||
|
onChainMetadataInputDetails: onChainMetadataInputDetails ? onChainMetadataInputDetails : undefined,
|
||||||
|
offChainMetadataUploadDetails: offChainMetadataUploadDetails ? offChainMetadataUploadDetails : undefined,
|
||||||
|
mintingDetails: mintingDetails ? mintingDetails : undefined,
|
||||||
|
}
|
||||||
|
onDetailsChange(data)
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [
|
||||||
|
imageUploadDetails,
|
||||||
|
collectionDetails,
|
||||||
|
royaltyDetails,
|
||||||
|
onChainMetadataInputDetails,
|
||||||
|
offChainMetadataUploadDetails,
|
||||||
|
mintingDetails,
|
||||||
|
])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{/* TODO: Cancel once we're able to index on-chain metadata */}
|
{/* TODO: Cancel once we're able to index on-chain metadata */}
|
||||||
|
Loading…
Reference in New Issue
Block a user