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:
commit
750f1fb48b
@ -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) {
|
||||
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user