Skip to content

Commit

Permalink
fix create token
Browse files Browse the repository at this point in the history
  • Loading branch information
zlayine committed Oct 4, 2024
1 parent e07643e commit 84c8ca2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion resources/js/components/pages/create/CreateToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,11 @@ const validation = yup.object({
collectionId: collectionIdRequiredSchema,
tokenId: stringRequiredSchema,
recipient: addressRequiredSchema,
initialSupply: numberRequiredSchema.typeError('Initial Supply must be a number').min(1),
initialSupply: yup.number().when({
is: () => tokenType.value === 'ft',
then: () => numberRequiredSchema.typeError('Initial Supply must be a number').min(1),
otherwise: () => numberNotRequiredSchema,
}),
capAmount: numberNotRequiredSchema,
beneficiaryAddress: addressNotRequiredSchema,
beneficiaryPercentage: yup.number().when('beneficiaryAddress', {
Expand Down

0 comments on commit 84c8ca2

Please sign in to comment.