From 982170cedb584561c856cf9a2f5c3053a4ef58d9 Mon Sep 17 00:00:00 2001 From: mihaisc Date: Wed, 5 Aug 2020 16:04:54 +0300 Subject: [PATCH] condition or advanced flow --- src/components/pages/Publish/index.tsx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/pages/Publish/index.tsx b/src/components/pages/Publish/index.tsx index 3adebc5fd..4a443194d 100644 --- a/src/components/pages/Publish/index.tsx +++ b/src/components/pages/Publish/index.tsx @@ -48,15 +48,19 @@ export default function PublishPage({ '', '' ) + switch (type) { + case 'advanced': { + // weight is hardcoded at 9 (90%) and publisher fee at 0.03(this was a random value set by me) + const pool = await ocean.pool.createDTPool( + accountId, + ddo.dataToken, + tokensToMint.toString(), + '9', + '0.03' + ) + } + } - // create pool for the data token, this is the advanced flow , currently hardcoded - const pool = await ocean.pool.createDTPool( - accountId, - ddo.dataToken, - tokensToMint.toString(), - '9', - '0.03' - ) if (publishError) { toast.error(publishError) return null