@@ -9,6 +9,7 @@ import { KNOWN_CONFIDENTIAL_EVMS } from './address.js'
99import ERC20Template from '@oceanprotocol/contracts/artifacts/contracts/interfaces/IERC20Template.sol/IERC20Template.json' with { type : 'json' }
1010import ERC20Template4 from '@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template4.sol/ERC20Template4.json' with { type : 'json' }
1111import { getContractAddress , getNFTFactory } from '../components/Indexer/utils.js'
12+ import { HeadersObject } from '../@types/fileObject.js'
1213
1314// Notes:
1415// Asset as per asset.py on provider, is a class there, while on ocean.Js we only have a type
@@ -44,7 +45,8 @@ export const AssetUtils = {
4445export async function fetchFileMetadata (
4546 url : string ,
4647 method : string ,
47- forceChecksum : boolean
48+ forceChecksum : boolean ,
49+ headers ?: HeadersObject
4850) : Promise < { contentLength : string ; contentType : string ; contentChecksum : string } > {
4951 let contentType : string = ''
5052 let contentLength : number = 0
@@ -56,6 +58,7 @@ export async function fetchFileMetadata(
5658 const response = await axios ( {
5759 url,
5860 method : method || 'get' ,
61+ headers,
5962 responseType : 'stream' ,
6063 timeout : 30000
6164 } )
@@ -143,7 +146,7 @@ export async function isERC20Template4Active(
143146) : Promise < boolean > {
144147 try {
145148 const nftFactoryAddress = getContractAddress ( network , 'ERC721Factory' )
146- const factoryERC721 = await getNFTFactory ( owner , nftFactoryAddress )
149+ const factoryERC721 = getNFTFactory ( owner , nftFactoryAddress )
147150 const currentTokenCount = await factoryERC721 . getCurrentTemplateCount ( )
148151
149152 for ( let i = 1 ; i <= currentTokenCount ; i ++ ) {
0 commit comments