@@ -8,24 +8,18 @@ export function generateType(
88 plutusDefinition : PlutusDefinition ,
99 typeDef : AikenType ,
1010) : GenType {
11- console . log ( 'typeDef: ' + JSON . stringify ( typeDef ) ) ;
1211 const path = getType ( typeDef . path ) ;
1312
1413 let lastPath = "" ;
1514 if ( path != null ) {
16- console . log ( 'path: ' + path ) ;
1715 const path_parts = path . split ( "/" ) ;
1816 lastPath = path_parts [ path_parts . length - 1 ] ;
19- console . log ( 'lastPath: ' + lastPath ) ;
2017 }
2118
2219 if ( path in builtInTypes ) {
23- console . log ( 'built in type!' )
2420 return builtInTypes [ lastPath ] ;
2521 }
2622
27- console . log ( 'NOT a built in type!' )
28-
2923 if ( "dataType" in typeDef ) {
3024 if ( typeDef . dataType == "list" && "items" in typeDef ) {
3125 const listType = getPointer (
@@ -143,7 +137,6 @@ export function generateType(
143137
144138 const listType = getPointer ( plutusDefinition , cur . $ref ) ;
145139 const genType = generateType ( plutusDefinition , listType ) ;
146- console . log ( 'about to crash 2: ' + genType ) ;
147140
148141 if ( genType . type == "primitive" ) {
149142 schema . push ( `${ cur . title } : ${ genType . schema } ,` ) ;
@@ -379,15 +372,13 @@ export function generateType(
379372 } ;
380373 }
381374 }
382- console . log ( 'about to crash: ' + JSON . stringify ( typeDef ) ) ;
383375 throw new Error ( "Type is not recognized" ) ;
384376}
385377
386378function getType ( path : string ) {
387379 if ( path != null && path . indexOf ( '/' ) != - 1 ) {
388380 const path_parts = path . split ( "/" ) ;
389381 const lastPath = path_parts [ path_parts . length - 1 ] ;
390- console . log ( 'path: ' + path + ' lastPath: ' + lastPath ) ;
391382 return lastPath ;
392383 } else {
393384 return path ;
0 commit comments