Skip to content

Commit

Permalink
fix: 🐞 hiddem Max Amount for new ID (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
saviojks authored Dec 13, 2024
1 parent 769ad70 commit aab4206
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/TransactionForms/CustomForms/AssetTrigger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ const AssetTrigger: React.FC<PropsWithChildren<IContractProps>> = ({

const getMintForm = (collection: ICollectionList, walletAddress: string) => {
const hasInternalId = collection.value?.split('/').length > 1;
const { watch } = useFormContext();
const watchCollectionAssetId = watch('collectionAssetId');

return (
<FormSection>
Expand All @@ -114,7 +116,10 @@ const getMintForm = (collection: ICollectionList, walletAddress: string) => {
tooltip={tooltip.receiver}
/>
<FormInput name="amount" title="Amount" type="number" required />
{!collection.isNFT && !collection.isFungible && !hasInternalId ? (
{!collection.isNFT &&
!collection.isFungible &&
!hasInternalId &&
!watchCollectionAssetId ? (
<FormInput name="value" title="Max Amount for new ID" type="number" />
) : null}
</FormSection>
Expand Down

0 comments on commit aab4206

Please sign in to comment.