Update Collection Actions > Actions for open edition collections
This commit is contained in:
parent
2def96407f
commit
edb93c0bbf
@ -175,7 +175,7 @@ export const CollectionActions = ({
|
||||
const showEndDateField = type === 'update_end_time'
|
||||
const showLimitField = type === 'update_per_address_limit'
|
||||
const showTokenIdField = isEitherType(type, ['transfer', 'mint_for', 'burn', 'update_token_metadata'])
|
||||
const showNumberOfTokensField = type === 'batch_mint'
|
||||
const showNumberOfTokensField = isEitherType(type, ['batch_mint', 'batch_mint_open_edition'])
|
||||
const showTokenIdListField = isEitherType(type, [
|
||||
'batch_burn',
|
||||
'batch_transfer',
|
||||
@ -185,12 +185,14 @@ export const CollectionActions = ({
|
||||
const showRecipientField = isEitherType(type, [
|
||||
'transfer',
|
||||
'mint_to',
|
||||
'mint_to_open_edition',
|
||||
'mint_for',
|
||||
'batch_mint',
|
||||
'batch_mint_open_edition',
|
||||
'batch_transfer',
|
||||
'batch_mint_for',
|
||||
])
|
||||
const showAirdropFileField = isEitherType(type, ['airdrop', 'airdrop_specific'])
|
||||
const showAirdropFileField = isEitherType(type, ['airdrop', 'airdrop_open_edition', 'airdrop_specific'])
|
||||
const showPriceField = isEitherType(type, ['update_mint_price', 'update_discount_price'])
|
||||
const showDescriptionField = type === 'update_collection_info'
|
||||
const showImageField = type === 'update_collection_info'
|
||||
|
@ -18,8 +18,10 @@ export const ACTION_TYPES = [
|
||||
'update_discount_price',
|
||||
'remove_discount_price',
|
||||
'mint_to',
|
||||
'mint_to_open_edition',
|
||||
'mint_for',
|
||||
'batch_mint',
|
||||
'batch_mint_open_edition',
|
||||
'set_whitelist',
|
||||
'update_start_time',
|
||||
'update_end_time',
|
||||
@ -34,6 +36,7 @@ export const ACTION_TYPES = [
|
||||
'batch_mint_for',
|
||||
'shuffle',
|
||||
'airdrop',
|
||||
'airdrop_open_edition',
|
||||
'airdrop_specific',
|
||||
'burn_remaining',
|
||||
'update_token_metadata',
|
||||
@ -206,12 +209,12 @@ export const OPEN_EDITION_ACTION_LIST: ActionListItem[] = [
|
||||
description: `Update mint price`,
|
||||
},
|
||||
{
|
||||
id: 'mint_to',
|
||||
id: 'mint_to_open_edition',
|
||||
name: 'Mint To',
|
||||
description: `Mint a token to a user`,
|
||||
},
|
||||
{
|
||||
id: 'batch_mint',
|
||||
id: 'batch_mint_open_edition',
|
||||
name: 'Batch Mint To',
|
||||
description: `Mint multiple tokens to a user`,
|
||||
},
|
||||
@ -266,7 +269,7 @@ export const OPEN_EDITION_ACTION_LIST: ActionListItem[] = [
|
||||
description: `Burn a list of tokens from the collection`,
|
||||
},
|
||||
{
|
||||
id: 'airdrop',
|
||||
id: 'airdrop_open_edition',
|
||||
name: 'Airdrop Tokens',
|
||||
description: 'Airdrop tokens to given addresses',
|
||||
},
|
||||
@ -347,12 +350,18 @@ export const dispatchExecute = async (args: DispatchExecuteArgs) => {
|
||||
case 'mint_to': {
|
||||
return vendingMinterMessages.mintTo(txSigner, args.recipient)
|
||||
}
|
||||
case 'mint_to_open_edition': {
|
||||
return openEditionMinterMessages.mintTo(txSigner, args.recipient)
|
||||
}
|
||||
case 'mint_for': {
|
||||
return vendingMinterMessages.mintFor(txSigner, args.recipient, args.tokenId)
|
||||
}
|
||||
case 'batch_mint': {
|
||||
return vendingMinterMessages.batchMint(txSigner, args.recipient, args.batchNumber)
|
||||
}
|
||||
case 'batch_mint_open_edition': {
|
||||
return openEditionMinterMessages.batchMint(txSigner, args.recipient, args.batchNumber)
|
||||
}
|
||||
case 'set_whitelist': {
|
||||
return vendingMinterMessages.setWhitelist(txSigner, args.whitelist)
|
||||
}
|
||||
@ -407,6 +416,9 @@ export const dispatchExecute = async (args: DispatchExecuteArgs) => {
|
||||
case 'airdrop': {
|
||||
return vendingMinterMessages.airdrop(txSigner, args.recipients)
|
||||
}
|
||||
case 'airdrop_open_edition': {
|
||||
return openEditionMinterMessages.airdrop(txSigner, args.recipients)
|
||||
}
|
||||
case 'airdrop_specific': {
|
||||
return vendingMinterMessages.airdropSpecificTokens(txSigner, args.tokenRecipients)
|
||||
}
|
||||
@ -445,12 +457,18 @@ export const previewExecutePayload = (args: DispatchExecuteArgs) => {
|
||||
case 'mint_to': {
|
||||
return vendingMinterMessages(minterContract)?.mintTo(args.recipient)
|
||||
}
|
||||
case 'mint_to_open_edition': {
|
||||
return openEditionMinterMessages(minterContract)?.mintTo(args.recipient)
|
||||
}
|
||||
case 'mint_for': {
|
||||
return vendingMinterMessages(minterContract)?.mintFor(args.recipient, args.tokenId)
|
||||
}
|
||||
case 'batch_mint': {
|
||||
return vendingMinterMessages(minterContract)?.batchMint(args.recipient, args.batchNumber)
|
||||
}
|
||||
case 'batch_mint_open_edition': {
|
||||
return openEditionMinterMessages(minterContract)?.batchMint(args.recipient, args.batchNumber)
|
||||
}
|
||||
case 'set_whitelist': {
|
||||
return vendingMinterMessages(minterContract)?.setWhitelist(args.whitelist)
|
||||
}
|
||||
@ -505,6 +523,9 @@ export const previewExecutePayload = (args: DispatchExecuteArgs) => {
|
||||
case 'airdrop': {
|
||||
return vendingMinterMessages(minterContract)?.airdrop(args.recipients)
|
||||
}
|
||||
case 'airdrop_open_edition': {
|
||||
return openEditionMinterMessages(minterContract)?.airdrop(args.recipients)
|
||||
}
|
||||
case 'airdrop_specific': {
|
||||
return vendingMinterMessages(minterContract)?.airdropSpecificTokens(args.tokenRecipients)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user