File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,10 @@ export const InstallModuleForm = (props: InstallModuleFormProps) => {
225225 moduleInfo : {
226226 bytecodeUri : selectedModule . metadata . bytecodeUri ,
227227 } ,
228+ isStylus :
229+ ( selectedModule . metadata . compilers ?. stylus &&
230+ selectedModule . metadata . compilers ?. stylus ?. length > 0 ) ||
231+ false ,
228232 } ) ;
229233 } ,
230234 queryKey : [
@@ -432,6 +436,7 @@ async function isModuleCompatible(options: {
432436 moduleInfo : {
433437 bytecodeUri : string ;
434438 } ;
439+ isStylus : boolean ;
435440 client : ThirdwebClient ;
436441} ) {
437442 // 1. get module's bytecode
@@ -444,15 +449,17 @@ async function isModuleCompatible(options: {
444449
445450 // 2. check compatibility with core and installed modules
446451 try {
447- const isCompatible = await checkModulesCompatibility ( {
448- chain : options . contractInfo . chain ,
449- client : options . client ,
450- coreBytecode : options . contractInfo . bytecode ,
451- moduleBytecodes : [
452- moduleBytecode ,
453- ...options . contractInfo . installedModuleBytecodes ,
454- ] ,
455- } ) ;
452+ const isCompatible =
453+ options . isStylus ||
454+ ( await checkModulesCompatibility ( {
455+ chain : options . contractInfo . chain ,
456+ client : options . client ,
457+ coreBytecode : options . contractInfo . bytecode ,
458+ moduleBytecodes : [
459+ moduleBytecode ,
460+ ...options . contractInfo . installedModuleBytecodes ,
461+ ] ,
462+ } ) ) ;
456463
457464 return isCompatible ;
458465 } catch ( e ) {
You can’t perform that action at this time.
0 commit comments