1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

allowing to add new services in the DDO when an asset is created

This commit is contained in:
Pedro Gutiérrez 2019-02-07 11:32:50 +01:00 committed by Pedro Gutiérrez
parent 8fb465fc5b
commit 3e50ded2e5

View File

@ -55,7 +55,7 @@ export default class OceanAssets {
* @param {Account} publisher Publicher account.
* @return {Promise<DDO>}
*/
public async create(metadata: MetaData, publisher: Account, services?: Service[]): Promise<DDO> {
public async create(metadata: MetaData, publisher: Account, services: Service[] = []): Promise<DDO> {
const {didRegistry} = await Keeper.getInstance()
const aquarius = AquariusProvider.getAquarius()
const brizo = BrizoProvider.getBrizo()
@ -143,6 +143,7 @@ export default class OceanAssets {
} as any,
},
},
...services,
],
})