mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
dt check
This commit is contained in:
parent
2e440f19b4
commit
fc534c3ce9
@ -70,18 +70,18 @@ export class Assets extends Instantiable {
|
|||||||
symbol?: string,
|
symbol?: string,
|
||||||
providerUri?: string
|
providerUri?: string
|
||||||
): SubscribablePromise<CreateProgressStep, DDO> {
|
): SubscribablePromise<CreateProgressStep, DDO> {
|
||||||
if (!isAddress(dtAddress)) {
|
if (dtAddress && !isAddress(dtAddress)) {
|
||||||
this.logger.error(
|
this.logger.error(
|
||||||
`Passed Data Token address ${dtAddress} is not valid. Aborting publishing.`
|
`Passed Data Token address ${dtAddress} is not valid. Aborting publishing.`
|
||||||
)
|
)
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.log('Creating asset')
|
this.logger.log('Creating asset')
|
||||||
return new SubscribablePromise(async (observer) => {
|
return new SubscribablePromise(async (observer) => {
|
||||||
if (services.length === 0) {
|
if (services.length === 0) {
|
||||||
this.logger.log('You have no services. Are you sure about this?')
|
this.logger.log('You have no services. Are you sure about this?')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dtAddress) {
|
if (!dtAddress) {
|
||||||
this.logger.log('Creating datatoken')
|
this.logger.log('Creating datatoken')
|
||||||
observer.next(CreateProgressStep.CreatingDataToken)
|
observer.next(CreateProgressStep.CreatingDataToken)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user