From 8fe4e2c77dbd5d5be1a705784dc9d6bb520c5df8 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 28 Aug 2020 17:18:57 +0200 Subject: [PATCH] tweak balances, dt display --- .../organisms/AssetActions/Pool/Token.module.css | 5 +---- src/components/organisms/AssetActions/Pool/index.tsx | 10 ++++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/organisms/AssetActions/Pool/Token.module.css b/src/components/organisms/AssetActions/Pool/Token.module.css index 815e31164..ecdd0df94 100644 --- a/src/components/organisms/AssetActions/Pool/Token.module.css +++ b/src/components/organisms/AssetActions/Pool/Token.module.css @@ -27,10 +27,7 @@ /* Data Token Icon Style */ .icon[class*='DT'] path { - fill: var(--brand-grey-dimmed); - stroke: var(--brand-black); - stroke-width: 5px; - stroke-linejoin: round; + fill: var(--brand-violet); } .icon[class*='%'], diff --git a/src/components/organisms/AssetActions/Pool/index.tsx b/src/components/organisms/AssetActions/Pool/index.tsx index 63dbee75e..ceb8c6ba7 100644 --- a/src/components/organisms/AssetActions/Pool/index.tsx +++ b/src/components/organisms/AssetActions/Pool/index.tsx @@ -18,9 +18,7 @@ export interface Balance { } /* - TODO: figure out correct userBalance TODO: create tooltip copy - TODO: figure out what to do with BPT */ export default function Pool({ ddo }: { ddo: DDO }): ReactElement { @@ -86,12 +84,16 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement { ) setPoolTokens(poolTokens) + // calculate user's provided liquidity based on pool tokens const userOceanBalance = (Number(poolTokens) / Number(totalPoolTokens)) * Number(oceanReserve) + const userDtBalance = + (Number(poolTokens) / Number(totalPoolTokens)) * Number(dtReserve) + const userBalance = { ocean: `${userOceanBalance}`, - dt: '-' + dt: `${userDtBalance}` } setUserBalance(userBalance) @@ -143,7 +145,7 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement { {/* */} - +