Revert "temp: remove liquidation price (#661)" (#663)

This reverts commit 0cba668c82.
This commit is contained in:
Bob van der Helm 2023-11-27 16:58:56 +01:00 committed by GitHub
parent 0cba668c82
commit 32321b263b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import debounce from 'lodash.debounce'
import React, { useEffect, useMemo, useState } from 'react'
import ActionButton from 'components/Button/ActionButton'
import { CircularProgress } from 'components/CircularProgress'
import DisplayCurrency from 'components/DisplayCurrency'
import Divider from 'components/Divider'
import { FormattedNumber } from 'components/FormattedNumber'
@ -121,6 +122,24 @@ export default function TradeSummary(props: Props) {
<Divider className='my-2' />
</>
)}
<>
<SummaryLine label='Liquidation Price'>
<div className='flex h-2'>
{isUpdatingLiquidationPrice ? (
<CircularProgress className='opacity-50' />
) : liquidationPrice === null || liquidationPrice === 0 ? (
'-'
) : (
<FormattedNumber
className='inline'
amount={liquidationPrice}
options={{ abbreviated: true, prefix: `${props.buyAsset.symbol} = $ ` }}
/>
)}
</div>
</SummaryLine>
<Divider className='my-2' />
</>
<SummaryLine label={`Swap fees (${(swapFee || 0.002) * 100}%)`}>
<DisplayCurrency coin={BNCoin.fromDenomAndBigNumber(sellAsset.denom, swapFeeValue)} />
</SummaryLine>