mirror of
https://github.com/oceanprotocol/react.git
synced 2025-02-14 21:10:38 +01:00
Merge pull request #158 from oceanprotocol/feature/add_more_sleeps
add sleeps
This commit is contained in:
commit
77e6a817b2
@ -11,6 +11,7 @@ import {
|
|||||||
getBuyDTFeedback,
|
getBuyDTFeedback,
|
||||||
getSellDTFeedback
|
getSellDTFeedback
|
||||||
} from './utils'
|
} from './utils'
|
||||||
|
import { sleep } from 'utils'
|
||||||
|
|
||||||
interface UsePricing {
|
interface UsePricing {
|
||||||
dtSymbol?: string
|
dtSymbol?: string
|
||||||
@ -228,6 +229,7 @@ function usePricing(ddo: DDO): UsePricing {
|
|||||||
: await ocean.fixedRateExchange
|
: await ocean.fixedRateExchange
|
||||||
.create(dataToken, `${price}`, accountId)
|
.create(dataToken, `${price}`, accountId)
|
||||||
.next((step: number) => setStep(step, 'exchange'))
|
.next((step: number) => setStep(step, 'exchange'))
|
||||||
|
await sleep(20000)
|
||||||
return tx
|
return tx
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setPricingError(error.message)
|
setPricingError(error.message)
|
||||||
|
@ -141,7 +141,7 @@ function usePublish(): UsePublish {
|
|||||||
)
|
)
|
||||||
.next(setStep)
|
.next(setStep)
|
||||||
Logger.log('ddo created', ddo)
|
Logger.log('ddo created', ddo)
|
||||||
await sleep(15000)
|
await sleep(20000)
|
||||||
setStep(7)
|
setStep(7)
|
||||||
return ddo
|
return ddo
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user