1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00
This commit is contained in:
mihaisc 2020-09-29 11:40:14 +03:00
parent 2e440f19b4
commit fc534c3ce9
No known key found for this signature in database
GPG Key ID: BE522BB8C3A5E2E4

View File

@ -70,18 +70,18 @@ export class Assets extends Instantiable {
symbol?: string,
providerUri?: string
): SubscribablePromise<CreateProgressStep, DDO> {
if (!isAddress(dtAddress)) {
if (dtAddress && !isAddress(dtAddress)) {
this.logger.error(
`Passed Data Token address ${dtAddress} is not valid. Aborting publishing.`
)
return null
}
this.logger.log('Creating asset')
return new SubscribablePromise(async (observer) => {
if (services.length === 0) {
this.logger.log('You have no services. Are you sure about this?')
}
if (!dtAddress) {
this.logger.log('Creating datatoken')
observer.next(CreateProgressStep.CreatingDataToken)