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

price output

This commit is contained in:
Matthias Kretschmann 2020-10-26 19:04:40 +01:00
parent 0658b656b1
commit 2ac9a7cf1b
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 12 additions and 2 deletions

View File

@ -58,3 +58,8 @@
margin-right: -2rem;
padding: 0 calc(var(--spacer) / 2);
}
.firstPrice {
text-align: center;
padding-top: calc(var(--spacer) / 4);
}

View File

@ -40,7 +40,7 @@ export default function Dynamic({
const [error, setError] = useState<string>()
// Calculate firstPrice whenever
// Calculate firstPrice whenever user values change
useEffect(() => {
const tokenAmountOut = 1
const weightRatio = new Decimal(weightOnDataToken).div(
@ -100,7 +100,12 @@ export default function Dynamic({
<Price ddo={ddo} />
{firstPrice}
{Number(firstPrice) > 0 && (
<aside className={styles.firstPrice}>
Expected first price:{' '}
<PriceUnit price={firstPrice} small conversion />
</aside>
)}
<h4 className={styles.title}>
Datatoken Liquidity Pool <Tooltip content={content.tooltips.poolInfo} />