From a73b0d888eef88f85e445270758dbaf31bd8a4e2 Mon Sep 17 00:00:00 2001 From: alexcos20 Date: Wed, 21 Oct 2020 08:21:26 -0700 Subject: [PATCH] add sleeps --- src/hooks/usePricing/usePricing.ts | 2 ++ src/hooks/usePublish/usePublish.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks/usePricing/usePricing.ts b/src/hooks/usePricing/usePricing.ts index 75cbd57..7f59edc 100644 --- a/src/hooks/usePricing/usePricing.ts +++ b/src/hooks/usePricing/usePricing.ts @@ -11,6 +11,7 @@ import { getBuyDTFeedback, getSellDTFeedback } from './utils' +import { sleep } from 'utils' interface UsePricing { dtSymbol?: string @@ -228,6 +229,7 @@ function usePricing(ddo: DDO): UsePricing { : await ocean.fixedRateExchange .create(dataToken, `${price}`, accountId) .next((step: number) => setStep(step, 'exchange')) + await sleep(20000) return tx } catch (error) { setPricingError(error.message) diff --git a/src/hooks/usePublish/usePublish.ts b/src/hooks/usePublish/usePublish.ts index de99aa7..b4466ed 100644 --- a/src/hooks/usePublish/usePublish.ts +++ b/src/hooks/usePublish/usePublish.ts @@ -141,7 +141,7 @@ function usePublish(): UsePublish { ) .next(setStep) Logger.log('ddo created', ddo) - await sleep(15000) + await sleep(20000) setStep(7) return ddo } catch (error) {