1
0
mirror of https://github.com/oceanprotocol/react.git synced 2024-12-23 01:29:49 +01:00

Merge pull request #157 from oceanprotocol/feature/add_publish_sleep

add sleep
This commit is contained in:
Alex Coseru 2020-10-21 18:05:39 +03:00 committed by GitHub
commit 750f1fb48b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import { useState } from 'react'
import { DataTokenOptions } from './DataTokenOptions'
import { useOcean } from 'providers'
import ProviderStatus from 'providers/OceanProvider/ProviderStatus'
import { publishFeedback } from 'utils'
import { publishFeedback, sleep } from 'utils'
interface UsePublish {
publish: (
@ -141,6 +141,7 @@ function usePublish(): UsePublish {
)
.next(setStep)
Logger.log('ddo created', ddo)
await sleep(15000)
setStep(7)
return ddo
} catch (error) {

View File

@ -39,3 +39,9 @@ export const publishFeedback: { [key in number]: string } = {
}
export * from './web3'
export function sleep(ms: number): Promise<void> {
return new Promise((resolve) => {
setTimeout(resolve, ms)
})
}