1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

output pool share

This commit is contained in:
Matthias Kretschmann 2020-08-19 22:06:25 +02:00
parent 8d51307852
commit d80d6d7990
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 10 additions and 0 deletions

View File

@ -31,3 +31,7 @@
stroke-width: 5px;
stroke-linejoin: round;
}
.icon[class*='%'] {
opacity: 0;
}

View File

@ -72,6 +72,11 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
init()
}, [ocean, accountId])
const poolShare =
totalBalance &&
userBalance &&
((Number(totalBalance.dt) * Number(userBalance.dt)) / 100).toFixed(2)
return (
<>
{isLoading ? (
@ -96,6 +101,7 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
<h3 className={styles.title}>Your Pool Share</h3>
<Token symbol="OCEAN" balance={userBalance.ocean} />
<Token symbol={dtSymbol} balance={userBalance.dt} />
<Token symbol="%" balance={poolShare} />
</div>
<div className={styles.tokens}>