1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-11-15 01:34:57 +01:00

tweak balances, dt display

This commit is contained in:
Matthias Kretschmann 2020-08-28 17:18:57 +02:00
parent f9047f25d2
commit 8fe4e2c77d
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 7 additions and 8 deletions

View File

@ -27,10 +27,7 @@
/* Data Token Icon Style */ /* Data Token Icon Style */
.icon[class*='DT'] path { .icon[class*='DT'] path {
fill: var(--brand-grey-dimmed); fill: var(--brand-violet);
stroke: var(--brand-black);
stroke-width: 5px;
stroke-linejoin: round;
} }
.icon[class*='%'], .icon[class*='%'],

View File

@ -18,9 +18,7 @@ export interface Balance {
} }
/* /*
TODO: figure out correct userBalance
TODO: create tooltip copy TODO: create tooltip copy
TODO: figure out what to do with BPT
*/ */
export default function Pool({ ddo }: { ddo: DDO }): ReactElement { export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
@ -86,12 +84,16 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
) )
setPoolTokens(poolTokens) setPoolTokens(poolTokens)
// calculate user's provided liquidity based on pool tokens
const userOceanBalance = const userOceanBalance =
(Number(poolTokens) / Number(totalPoolTokens)) * Number(oceanReserve) (Number(poolTokens) / Number(totalPoolTokens)) * Number(oceanReserve)
const userDtBalance =
(Number(poolTokens) / Number(totalPoolTokens)) * Number(dtReserve)
const userBalance = { const userBalance = {
ocean: `${userOceanBalance}`, ocean: `${userOceanBalance}`,
dt: '-' dt: `${userDtBalance}`
} }
setUserBalance(userBalance) setUserBalance(userBalance)
@ -143,7 +145,7 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
<Token symbol="OCEAN" balance={userBalance.ocean} /> <Token symbol="OCEAN" balance={userBalance.ocean} />
<Token symbol={dtSymbol} balance={userBalance.dt} /> <Token symbol={dtSymbol} balance={userBalance.dt} />
{/* <Token symbol="BPT" balance={poolTokens} /> */} {/* <Token symbol="BPT" balance={poolTokens} /> */}
<Token symbol="%" balance={poolShare} /> <Token symbol="% of pool" balance={poolShare} />
</div> </div>
<div className={styles.tokens}> <div className={styles.tokens}>