@@ -15,32 +15,34 @@ const CONTRACT_ADDRESS = '0x8087039152c472Fa74F47398628fF002994056EA';
1515
1616export class HighlightIngestor implements MintIngestor {
1717 async supportsUrl ( resources : MintIngestorResources , url : string ) : Promise < boolean > {
18- const id = url . split ( '/' ) . pop ( ) ;
19- if ( ! id ) {
20- return false ;
21- }
22-
23- const collection = await getHighlightCollectionById ( resources , id ) ;
24-
25- if ( ! collection || collection . chainId !== 8453 ) {
26- return false ;
27- }
28-
29- const urlPattern = / ^ h t t p s : \/ \/ h i g h l i g h t \. x y z \/ m i n t \/ [ a - f 0 - 9 ] { 24 } $ / ;
30- return (
31- new URL ( url ) . hostname === 'www.highlight.xyz' || new URL ( url ) . hostname === 'highlight.xyz' || urlPattern . test ( url )
32- ) ;
18+ return false ;
19+ // const id = url.split('/').pop();
20+ // if (!id) {
21+ // return false;
22+ // }
23+
24+ // const collection = await getHighlightCollectionById(resources, id);
25+
26+ // if (!collection || collection.chainId !== 8453) {
27+ // return false;
28+ // }
29+
30+ // const urlPattern = /^https:\/\/highlight\.xyz\/mint\/[a-f0-9]{24}$/;
31+ // return (
32+ // new URL(url).hostname === 'www.highlight.xyz' || new URL(url).hostname === 'highlight.xyz' || urlPattern.test(url)
33+ // );
3334 }
3435
3536 async supportsContract ( resources : MintIngestorResources , contractOptions : MintContractOptions ) : Promise < boolean > {
36- if ( contractOptions . chainId !== 8453 ) {
37- return false ;
38- }
39- const collection = await getHighlightCollectionByAddress ( resources , contractOptions ) ;
40- if ( ! collection ) {
41- return false ;
42- }
43- return true ;
37+ return false ;
38+ // if (contractOptions.chainId !== 8453) {
39+ // return false;
40+ // }
41+ // const collection = await getHighlightCollectionByAddress(resources, contractOptions);
42+ // if (!collection) {
43+ // return false;
44+ // }
45+ // return true;
4446 }
4547
4648 async createMintForContract (
@@ -80,7 +82,7 @@ export class HighlightIngestor implements MintIngestor {
8082 throw new MintIngestorError ( MintIngestionErrorName . MissingRequiredData , 'Error finding creator' ) ;
8183 }
8284
83- const collectionId = collection . highlightCollection ?. id ;
85+ const collectionId = collection . highlightCollection ?. id || collection . id ;
8486
8587 if ( ! collectionId ) {
8688 throw new MintIngestorError ( MintIngestionErrorName . MissingRequiredData , 'Collection id not available' ) ;
0 commit comments