From db0078266a98bcce678f57cbd74f26cddeafbc6e Mon Sep 17 00:00:00 2001 From: mariacarmina Date: Thu, 7 Nov 2024 17:31:22 +0200 Subject: [PATCH] Fix exported function. --- src/commands.ts | 14 +++++--------- src/publishAsset.ts | 7 +++---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/commands.ts b/src/commands.ts index d2c50c0..c25e1f1 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -2,7 +2,7 @@ import fs from "fs"; import os from "os"; import util from "util"; import { - createAsset, + createAssetUtil, handleComputeOrder, updateAssetMetadata, downloadFile, @@ -92,17 +92,15 @@ export class Commands { const encryptDDO = args[2] === "false" ? false : true; try { // add some more checks - const urlAssetId = await createAsset( + const urlAssetId = await createAssetUtil( asset.nft.name, asset.nft.symbol, this.signer, asset.services[0].files, asset, - this.providerUrl, + this.providerUrl || this.macOsProviderUrl, this.config, this.aquarius, - 1, - this.macOsProviderUrl, encryptDDO ); console.log("Asset published. ID: " + urlAssetId); @@ -124,17 +122,15 @@ export class Commands { } const encryptDDO = args[2] === "false" ? false : true; // add some more checks - const algoDid = await createAsset( + const algoDid = await createAssetUtil( algoAsset.nft.name, algoAsset.nft.symbol, this.signer, algoAsset.services[0].files, algoAsset, - this.providerUrl, + this.providerUrl || this.macOsProviderUrl, this.config, this.aquarius, - 1, - this.macOsProviderUrl, encryptDDO ); // add some more checks diff --git a/src/publishAsset.ts b/src/publishAsset.ts index 57a08ce..d158802 100644 --- a/src/publishAsset.ts +++ b/src/publishAsset.ts @@ -5,7 +5,7 @@ import { Aquarius, DDO } from '@oceanprotocol/lib'; -import { createAsset, updateAssetMetadata } from './helpers'; +import { createAssetUtil, updateAssetMetadata } from './helpers'; export interface PublishAssetParams { title: string; @@ -81,7 +81,7 @@ export async function publishAsset(params: PublishAssetParams, signer: Signer, c }; // Other networks - const did = await createAsset( + const did = await createAssetUtil( params.title, 'OCEAN-NFT', signer, @@ -89,8 +89,7 @@ export async function publishAsset(params: PublishAssetParams, signer: Signer, c metadata, params.providerUrl, config, - aquarius, - params.template || 1 + aquarius );