Update Collection Actions > Infinity Swap UI

This commit is contained in:
Serkan Reis 2023-10-12 16:45:33 +03:00
parent bf6ae87a69
commit fb51f1519f
2 changed files with 11 additions and 2 deletions

View File

@ -181,7 +181,9 @@ export const CollectionActions = ({
type !== 'update_royalties_for_infinity_swap'
? 'Percentage of royalties to be paid'
: 'Change in share percentage',
placeholder: '5%',
placeholder: isEitherType(type, ['set_royalties_for_infinity_swap', 'update_royalties_for_infinity_swap'])
? '0.5%'
: '5%',
})
const showTokenUriField = isEitherType(type, ['mint_token_uri', 'update_token_metadata'])
@ -310,6 +312,13 @@ export const CollectionActions = ({
royaltyShareState.value,
])
useEffect(() => {
if (isEitherType(type, ['set_royalties_for_infinity_swap']) && Number(royaltyShareState.value) > 5) {
royaltyShareState.onChange('5')
toast.error('Royalty share cannot be greater than 5% for Infinity Swap')
}
}, [royaltyShareState.value])
useEffect(() => {
const addresses: string[] = []
airdropAllocationArray.forEach((allocation) => {

View File

@ -226,7 +226,7 @@ export const CollectionDetails = ({
<FormControl
className={clsx('mt-2')}
htmlId="timestamp"
subtitle="Trading start time offset will be set as 2 weeks by default."
subtitle="Trading start time offset will be set as 1 week by default."
title={`Trading Start Time (optional | ${timezone === 'Local' ? 'local)' : 'UTC)'}`}
>
<InputDateTime