@ -71,94 +71,80 @@ export default function SortList ({
className = "select-quote-popover__column-header select-quote-popover__receiving"
onClick = { ( ) => onColumnHeaderClick ( 'destinationTokenValue' ) }
>
< div className = "select-quote-popover__receiving-header" >
< span className = "select-quote-popover__receiving-symbol" > { swapToSymbol } < / s p a n >
< div className = "select-quote-popover__receiving-label" >
< span > { t ( 'swapReceiving' ) } < / s p a n >
< InfoTooltip
position = "bottom"
contentText = { t ( 'swapReceivingInfoTooltip' ) }
/ >
< ToggleArrows / >
< / d i v >
< / d i v >
< / d i v >
< div
className = "select-quote-popover__column-header select-quote-popover__network-fees"
onClick = { ( ) => onColumnHeaderClick ( 'rawNetworkFees' ) }
>
< div className = "select-quote-popover__network-fees-header" >
< span > { t ( 'swapEstimatedNetworkFees' ) } < / s p a n >
< span className = "select-quote-popover__receiving-symbol" > { swapToSymbol } < / s p a n >
< div className = "select-quote-popover__receiving-label" >
< span > { t ( 'swapReceiving' ) } < / s p a n >
< InfoTooltip
position = "bottom"
contentText = { t ( 'swapEstimatedNetworkFeesInfo ' ) }
contentText = { t ( 'swapReceivingInfoTooltip' ) }
/ >
< ToggleArrows / >
< / d i v >
< / d i v >
< div
className = "select-quote-popover__column-header select-quote-popover__network-fees select-quote-popover__network-fees-header"
onClick = { ( ) => onColumnHeaderClick ( 'rawNetworkFees' ) }
>
< span > { t ( 'swapEstimatedNetworkFees' ) } < / s p a n >
< InfoTooltip
position = "bottom"
contentText = { t ( 'swapEstimatedNetworkFeesInfo' ) }
/ >
< ToggleArrows / >
< / d i v >
< div
className = "select-quote-popover__column-header select-quote-popover__quote-source"
onClick = { ( ) => onColumnHeaderClick ( 'liquiditySource' ) }
>
< >
{ t ( 'swapQuoteSource' ) }
< div className = "select-quote-popover__quote-source-toggle" > < ToggleArrows / > < / d i v >
< / >
{ t ( 'swapQuoteSource' ) }
< div className = "select-quote-popover__quote-source-toggle" > < ToggleArrows / > < / d i v >
< / d i v >
< / d i v >
< div className = "select-quote-popover__rows" >
{
sortedRows . map ( ( { destinationTokenValue , networkFees , isBestQuote , quoteSource , aggId } , i ) => (
< div
className = { classnames ( 'select-quote-popover__row' , {
'select-quote-popover__row--selected' : selectedRow === i ,
'select-quote-popover__row--no-hover' : noRowHover ,
} ) }
onClick = { ( ) => onSelect ( aggId ) }
key = { ` select-quote-popover-row- ${ i } ` }
>
< div
className = "select-quote-popover__receiving"
>
< div className = "select-quote-popover__receiving-value" >
{ isBestQuote && < SunCheckIcon reverseColors = { selectedRow !== i } / > }
< div className = "select-quote-popover__receiving-value-text" title = { destinationTokenValue } > { destinationTokenValue } < / d i v >
< / d i v >
{ quoteSource === 'RFQ' && < span className = "select-quote-popover__zero-slippage" > { t ( 'swapZeroSlippage' ) } < / s p a n > }
< / d i v >
< div
className = "select-quote-popover__network-fees"
>
{ networkFees }
< / d i v >
< div
className = "select-quote-popover__quote-source"
>
< div
className = { classnames ( 'select-quote-popover__quote-source-label' , {
'select-quote-popover__quote-source-label--green' : quoteSource === 'AGG' ,
'select-quote-popover__quote-source-label--orange' : quoteSource === 'RFQ' ,
'select-quote-popover__quote-source-label--blue' : quoteSource === 'DEX' ,
} ) }
>
{ quoteSource }
< / d i v >
{
sortedRows . map ( ( { destinationTokenValue , networkFees , isBestQuote , quoteSource , aggId } , i ) => (
< div
className = { classnames ( 'select-quote-popover__row' , {
'select-quote-popover__row--selected' : selectedRow === i ,
'select-quote-popover__row--no-hover' : noRowHover ,
} ) }
onClick = { ( ) => onSelect ( aggId ) }
key = { ` select-quote-popover-row- ${ i } ` }
>
< div className = "select-quote-popover__receiving" >
< div className = "select-quote-popover__receiving-value" >
{ isBestQuote && < SunCheckIcon reverseColors = { selectedRow !== i } / > }
< div className = "select-quote-popover__receiving-value-text" title = { destinationTokenValue } > { destinationTokenValue } < / d i v >
< / d i v >
{ quoteSource === 'RFQ' && < span className = "select-quote-popover__zero-slippage" > { t ( 'swapZeroSlippage' ) } < / s p a n > }
< / d i v >
< div className = "select-quote-popover__network-fees" >
{ networkFees }
< / d i v >
< div className = "select-quote-popover__quote-source" >
< div
className = "select-quote-popover__caret-right"
onClick = { ( event ) => {
event . stopPropagation ( )
onCaretClick ( aggId )
} }
onMouseEnter = { ( ) => setRowNowHover ( true ) }
onMouseLeave = { ( ) => setRowNowHover ( false ) }
className = { classnames ( 'select-quote-popover__quote-source-label' , {
'select-quote-popover__quote-source-label--green' : quoteSource === 'AGG' ,
'select-quote-popover__quote-source-label--orange' : quoteSource === 'RFQ' ,
'select-quote-popover__quote-source-label--blue' : quoteSource === 'DEX' ,
} ) }
>
< i className = "fa fa-angle-up" / >
{ quoteSource }
< / d i v >
< / d i v >
) )
}
< / d i v >
< div
className = "select-quote-popover__caret-right"
onClick = { ( event ) => {
event . stopPropagation ( )
onCaretClick ( aggId )
} }
onMouseEnter = { ( ) => setRowNowHover ( true ) }
onMouseLeave = { ( ) => setRowNowHover ( false ) }
>
< i className = "fa fa-angle-up" / >
< / d i v >
< / d i v >
) )
}
< / d i v >
)
}