@@ -31,7 +31,18 @@ const imgSrcByNetwork = {
31
31
}
32
32
33
33
export const CreateThirdPartyCollectionModal : FC < Props > = ( props : Props ) => {
34
- const { name, thirdParties, onClose, isCreatingCollection, isThirdPartyV2Enabled, error, ownerAddress, onSubmit, onBack } = props
34
+ const {
35
+ name,
36
+ thirdParties,
37
+ onClose,
38
+ isCreatingCollection,
39
+ isLinkedWearablesV2Enabled,
40
+ isLinkedWearablesPaymentsEnabled,
41
+ error,
42
+ ownerAddress,
43
+ onSubmit,
44
+ onBack
45
+ } = props
35
46
const [ collectionName , setCollectionName ] = useState ( '' )
36
47
const [ hasCollectionIdBeenTyped , setHasCollectionIdBeenTyped ] = useState ( false )
37
48
const [ collectionId , setCollectionId ] = useState ( '' )
@@ -137,7 +148,7 @@ export const CreateThirdPartyCollectionModal: FC<Props> = (props: Props) => {
137
148
} , [ onSubmit , collectionId , collectionName , selectedThirdParty , ownerAddress , analytics ] )
138
149
139
150
const isSubmittable = collectionName && ownerAddress && ! isCollectionNameInvalid && collectionId
140
- ! isCreatingCollection && ( isThirdPartyV2Enabled ? selectedContract && selectedNetwork : true )
151
+ ! isCreatingCollection && ( isLinkedWearablesV2Enabled ? selectedContract && selectedNetwork : true )
141
152
const isLoading = isCreatingCollection
142
153
143
154
return (
@@ -146,7 +157,7 @@ export const CreateThirdPartyCollectionModal: FC<Props> = (props: Props) => {
146
157
title = { t ( 'create_third_party_collection_modal.title' ) }
147
158
subtitle = { t ( 'create_third_party_collection_modal.subtitle' ) }
148
159
onClose = { isLoading ? undefined : onClose }
149
- onBack = { isLoading ? undefined : onBack }
160
+ onBack = { isLoading || ! isLinkedWearablesPaymentsEnabled ? undefined : onBack }
150
161
/>
151
162
< Form onSubmit = { handleSubmit } disabled = { ! isSubmittable } >
152
163
< ModalContent >
@@ -157,7 +168,7 @@ export const CreateThirdPartyCollectionModal: FC<Props> = (props: Props) => {
157
168
disabled = { isLoading }
158
169
value = { selectedThirdParty . id }
159
170
/>
160
- { isThirdPartyV2Enabled && thirdPartyContractNetworkOptions . length > 0 && (
171
+ { isLinkedWearablesV2Enabled && thirdPartyContractNetworkOptions . length > 0 && (
161
172
< div className = { styles . contract } >
162
173
< SelectField
163
174
label = { t ( 'global.network' ) }
@@ -185,7 +196,7 @@ export const CreateThirdPartyCollectionModal: FC<Props> = (props: Props) => {
185
196
message = { isCollectionNameInvalid ? t ( 'create_third_party_collection_modal.name_field.message' ) : '' }
186
197
disabled = { isLoading }
187
198
/>
188
- { ! isThirdPartyV2Enabled && (
199
+ { ! isLinkedWearablesV2Enabled && (
189
200
< Field
190
201
label = { t ( 'create_third_party_collection_modal.collection_id_field.label' ) }
191
202
placeholder = "0x..."
0 commit comments