mirror of
https://github.com/oceanprotocol/react.git
synced 2025-01-25 01:32:08 +01:00
add sleep
This commit is contained in:
parent
24b4ea9601
commit
824a7c2feb
@ -35,6 +35,11 @@ function usePublish(): UsePublish {
|
|||||||
setPublishStep(index)
|
setPublishStep(index)
|
||||||
index && setPublishStepText(publishFeedback[index])
|
index && setPublishStepText(publishFeedback[index])
|
||||||
}
|
}
|
||||||
|
function sleep(ms: number) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(resolve, ms)
|
||||||
|
})
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Publish an asset.It also creates the datatoken, mints tokens and gives the market allowance
|
* Publish an asset.It also creates the datatoken, mints tokens and gives the market allowance
|
||||||
* @param {Metadata} asset The metadata of the asset.
|
* @param {Metadata} asset The metadata of the asset.
|
||||||
@ -141,6 +146,7 @@ function usePublish(): UsePublish {
|
|||||||
)
|
)
|
||||||
.next(setStep)
|
.next(setStep)
|
||||||
Logger.log('ddo created', ddo)
|
Logger.log('ddo created', ddo)
|
||||||
|
await sleep(20000)
|
||||||
setStep(7)
|
setStep(7)
|
||||||
return ddo
|
return ddo
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user