@@ -6,6 +6,7 @@ import { FormErrorMessage, FormLabel } from "tw-components";
66import type { CustomContractDeploymentForm } from "./custom-contract" ;
77import { PrimarySaleFieldset } from "./primary-sale-fieldset" ;
88import { RoyaltyFieldset } from "./royalty-fieldset" ;
9+ import { SequentialTokenIdFieldset } from "./sequential-token-id-fieldset" ;
910
1011export function getModuleInstallParams ( mod : FetchDeployMetadataResult ) {
1112 return (
@@ -67,6 +68,16 @@ function RenderModule(props: {
6768 < RenderPrimarySaleFieldset module = { module } form = { form } isTWPublisher />
6869 ) ;
6970 }
71+
72+ if ( showSequentialTokenIdFieldset ( paramNames ) ) {
73+ return (
74+ < RenderSequentialTokenIdFieldset
75+ module = { module }
76+ form = { form }
77+ isTWPublisher
78+ />
79+ ) ;
80+ }
7081 }
7182
7283 return (
@@ -133,6 +144,26 @@ function RenderPrimarySaleFieldset(prosp: {
133144 ) ;
134145}
135146
147+ function RenderSequentialTokenIdFieldset ( prosp : {
148+ module : FetchDeployMetadataResult ;
149+ form : CustomContractDeploymentForm ;
150+ isTWPublisher : boolean ;
151+ } ) {
152+ const { module, form } = prosp ;
153+
154+ const startTokenIdPath = `moduleData.${ module . name } .startTokenId` as const ;
155+
156+ return (
157+ < SequentialTokenIdFieldset
158+ isInvalid = { ! ! form . getFieldState ( startTokenIdPath , form . formState ) . error }
159+ register = { form . register ( startTokenIdPath ) }
160+ errorMessage = {
161+ form . getFieldState ( startTokenIdPath , form . formState ) . error ?. message
162+ }
163+ />
164+ ) ;
165+ }
166+
136167function RenderRoyaltyFieldset ( props : {
137168 module : FetchDeployMetadataResult ;
138169 form : CustomContractDeploymentForm ;
@@ -194,3 +225,7 @@ export function showRoyaltyFieldset(paramNames: string[]) {
194225export function showPrimarySaleFiedset ( paramNames : string [ ] ) {
195226 return paramNames . length === 1 && paramNames . includes ( "primarySaleRecipient" ) ;
196227}
228+
229+ export function showSequentialTokenIdFieldset ( paramNames : string [ ] ) {
230+ return paramNames . length === 1 && paramNames . includes ( "startTokenId" ) ;
231+ }
0 commit comments