Skip to content

Commit

Permalink
Fix exported function.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariacarmina committed Nov 7, 2024
1 parent 9eb253e commit db00782
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
14 changes: 5 additions & 9 deletions src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fs from "fs";
import os from "os";
import util from "util";
import {
createAsset,
createAssetUtil,
handleComputeOrder,
updateAssetMetadata,
downloadFile,
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand Down
7 changes: 3 additions & 4 deletions src/publishAsset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -81,16 +81,15 @@ export async function publishAsset(params: PublishAssetParams, signer: Signer, c
};

// Other networks
const did = await createAsset(
const did = await createAssetUtil(
params.title,
'OCEAN-NFT',
signer,
assetUrl,
metadata,
params.providerUrl,
config,
aquarius,
params.template || 1
aquarius
);


Expand Down

0 comments on commit db00782

Please sign in to comment.