File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ function ClaimableModule(props: ModuleInstanceProps) {
174174 isOwnerAccount = { ! ! ownerAccount }
175175 isErc721 = { isErc721 }
176176 isSequentialTokenIdInstalled = { isSequentialTokenIdInstalled }
177+ chainId = { props . contract . chain . id }
177178 />
178179 ) ;
179180}
@@ -188,6 +189,7 @@ export function ClaimableModuleUI(
188189 mint : ( values : MintFormValues ) => Promise < void > ;
189190 isErc721 : boolean ;
190191 isSequentialTokenIdInstalled : boolean ;
192+ chainId : number ;
191193 } ,
192194) {
193195 return (
@@ -238,6 +240,7 @@ export function ClaimableModuleUI(
238240 claimCondition = { props . claimCondition }
239241 update = { props . update }
240242 isErc721 = { props . isErc721 }
243+ chainId = { props . chainId }
241244 />
242245 </ AccordionContent >
243246 </ AccordionItem >
@@ -284,6 +287,7 @@ function ConfigSection(props: {
284287 update : ( values : ConfigFormValues ) => Promise < void > ;
285288 isOwnerAccount : boolean ;
286289 isErc721 : boolean ;
290+ chainId : number ;
287291} ) {
288292 const form = useForm < ConfigFormValues > ( {
289293 resolver : zodResolver ( configFormSchema ) ,
@@ -397,7 +401,10 @@ function ConfigSection(props: {
397401 render = { ( { field } ) => (
398402 < FormItem >
399403 < FormLabel > Currency</ FormLabel >
400- < CurrencySelector field = { field } />
404+ < CurrencySelector
405+ contractChainId = { props . chainId }
406+ field = { field }
407+ />
401408 </ FormItem >
402409 ) }
403410 />
Original file line number Diff line number Diff line change @@ -26,15 +26,17 @@ interface CurrencySelectorProps<
2626 field : ControllerRenderProps < TFieldValues > ;
2727}
2828
29- export const CurrencySelector : React . FC < CurrencySelectorProps > = ( {
29+ export function CurrencySelector <
30+ TFieldValues extends FieldValues = FieldValues ,
31+ > ( {
3032 small,
3133 hideDefaultCurrencies,
3234 showCustomCurrency = true ,
3335 isPaymentsSelector = false ,
3436 defaultCurrencies = [ ] ,
3537 field,
3638 contractChainId : chainId ,
37- } ) => {
39+ } : CurrencySelectorProps < TFieldValues > ) {
3840 const { idToChain } = useAllChainsData ( ) ;
3941 const chain = chainId ? idToChain . get ( chainId ) : undefined ;
4042
@@ -185,4 +187,4 @@ export const CurrencySelector: React.FC<CurrencySelectorProps> = ({
185187 </ Select >
186188 </ div >
187189 ) ;
188- } ;
190+ }
Original file line number Diff line number Diff line change @@ -122,6 +122,7 @@ function Component() {
122122 isErc721 = { isErc721 }
123123 claimCondition = { claimCondition }
124124 isSequentialTokenIdInstalled = { isSequentialTokenIdInstalled }
125+ chainId = { 1 }
125126 />
126127 </ BadgeContainer >
127128
@@ -141,6 +142,7 @@ function Component() {
141142 isErc721 = { isErc721 }
142143 claimCondition = { claimCondition }
143144 isSequentialTokenIdInstalled = { isSequentialTokenIdInstalled }
145+ chainId = { 1 }
144146 />
145147 </ BadgeContainer >
146148
@@ -160,6 +162,7 @@ function Component() {
160162 isErc721 = { isErc721 }
161163 claimCondition = { claimCondition }
162164 isSequentialTokenIdInstalled = { isSequentialTokenIdInstalled }
165+ chainId = { 1 }
163166 />
164167 </ BadgeContainer >
165168
You can’t perform that action at this time.
0 commit comments