1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

some fixes + cleaning

This commit is contained in:
paulo-ocean 2024-09-13 09:09:16 +01:00
parent 442eef760f
commit 4bcb1d9348
3 changed files with 5 additions and 12 deletions

View File

@ -307,7 +307,7 @@ export class ConfigHelper {
// check oasis network name typos on addresses.json
if (!contractAddressesConfig && KNOWN_CONFIDENTIAL_EVMS.includes(config.chainId)) {
contractAddressesConfig = this.getAddressesFromEnv(
config.network.replaceAll('sapp', 'sap'),
config.network.replace('sapph', 'saph'),
addresses
)
}

View File

@ -125,7 +125,6 @@ export async function calculateActiveTemplateIndex(
* @param encryptDDO encrypt or not?
* @param providerUrl the provider URL
* @param providerFeeToken the provider fee token
* @param nftContractAddress the nft contract address
* @param aquariusInstance aquarius, could be node instance url
* @param allowAccessList?: string,
* @param denyAccessList?: string
@ -142,7 +141,6 @@ export async function createAsset(
providerUrl: string,
providerFeeToken: string,
aquariusInstance: Aquarius,
nftContractAddress?: string, // addresses.ERC721Factory,
accessListFactory?: string, // access list factory address
allowAccessList?: string, // allow list address
denyAccessList?: string // deny list address
@ -156,13 +154,9 @@ export async function createAsset(
const config = new ConfigHelper().getConfig(parseInt(String(chainID)))
if (!nftContractAddress) {
nftContractAddress = config.nftFactoryAddress
}
let templateIndex = await calculateActiveTemplateIndex(
owner,
nftContractAddress,
config.nftFactoryAddress,
templateIDorAddress
)
@ -175,7 +169,7 @@ export async function createAsset(
const nft = new Nft(owner, chainID)
const nftFactory = new NftFactory(nftContractAddress, owner)
const nftFactory = new NftFactory(config.nftFactoryAddress, owner)
// get nft owner
const account = await owner.getAddress()

View File

@ -207,13 +207,12 @@ describe('Publish tests', async () => {
'TEST',
ownerAddress,
assetUrl,
'0x13a9813e7CE3fdc867C23Ef9c084570B7F2abdeC', // template 1 on dev network
1, // template 1 on dev network
fixedPriceDdo,
true, // encrypted ddo
providerUrl,
ZERO_ADDRESS, // provider fee token
aquarius,
addresses.ERC721Factory // nft template factory
aquarius
)
console.log('Published asset, ddo id:', asset)