1
0
mirror of https://github.com/oceanprotocol/react.git synced 2025-01-24 17:21:58 +01:00

add sleep

This commit is contained in:
alexcos20 2020-10-21 07:57:00 -07:00
parent 24b4ea9601
commit 824a7c2feb

View File

@ -35,6 +35,11 @@ function usePublish(): UsePublish {
setPublishStep(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
* @param {Metadata} asset The metadata of the asset.
@ -141,6 +146,7 @@ function usePublish(): UsePublish {
)
.next(setStep)
Logger.log('ddo created', ddo)
await sleep(20000)
setStep(7)
return ddo
} catch (error) {