1- import clsx from " clsx" ;
2- import { FC , useState } from " react" ;
3- import { MdKeyboardArrowDown } from " react-icons/md" ;
4- import SwapKeyValue from " ./SwapKeyValue" ;
5- import { AnimatePresence , motion } from " framer-motion" ;
6- import { useSwapStore } from " ../../store/swap.store" ;
7- import formatNumber from " ../../utils/formatNum" ;
8- import { CgSpinnerTwo } from " react-icons/cg" ;
9- import " ./SwapDetails.scss" ;
10- import { useTranslation } from " react-i18next" ;
11- import { useMeasure } from " @uidotdev/usehooks" ;
12- import { BsArrowRightShort , BsChevronRight } from " react-icons/bs" ;
1+ import clsx from ' clsx' ;
2+ import { FC , useState } from ' react' ;
3+ import { MdKeyboardArrowDown } from ' react-icons/md' ;
4+ import SwapKeyValue from ' ./SwapKeyValue' ;
5+ import { AnimatePresence , motion } from ' framer-motion' ;
6+ import { useSwapStore } from ' ../../store/swap.store' ;
7+ import formatNumber from ' ../../utils/formatNum' ;
8+ import { CgSpinnerTwo } from ' react-icons/cg' ;
9+ import ' ./SwapDetails.scss' ;
10+ import { useTranslation } from ' react-i18next' ;
11+ import { useMeasure } from ' @uidotdev/usehooks' ;
12+ import { BsArrowRightShort , BsChevronRight } from ' react-icons/bs' ;
1313
1414const SwapDetails = ( ) => {
1515 const { t } = useTranslation ( ) ;
@@ -28,8 +28,8 @@ const SwapDetails = () => {
2828 < div className = "detail-accordion" >
2929 { onePayRoute && onePayRoute . pool_data && ! isFindingBestRoute ? (
3030 < div className = "one-pay" >
31- 1 { onePayRoute . pool_data . route_view [ 0 ] } ≈{ " " }
32- { formatNumber ( onePayRoute . pool_data . receive_show , 4 ) } { " " }
31+ 1 { onePayRoute . pool_data . route_view [ 0 ] } ≈{ ' ' }
32+ { formatNumber ( onePayRoute . pool_data . receive_show , 4 ) } { ' ' }
3333 {
3434 onePayRoute . pool_data . route_view [
3535 onePayRoute . pool_data . route_view . length - 1
@@ -39,12 +39,12 @@ const SwapDetails = () => {
3939 ) : (
4040 < div className = "finding" >
4141 < CgSpinnerTwo className = "animate-spin" />
42- { t ( " fetching_best_route" ) }
42+ { t ( ' fetching_best_route' ) }
4343 </ div >
4444 ) }
4545 < div >
4646 < MdKeyboardArrowDown
47- className = { clsx ( " icon" , isOpen ? " is-open" : "" ) }
47+ className = { clsx ( ' icon' , isOpen ? ' is-open' : '' ) }
4848 />
4949 </ div >
5050 </ div >
@@ -62,41 +62,41 @@ const SwapDetails = () => {
6262 >
6363 < div ref = { ref } className = "details-inner-container" >
6464 < SwapKeyValue
65- keyText = { t ( " slippage_tolerance" ) }
65+ keyText = { t ( ' slippage_tolerance' ) }
6666 value = {
6767 < div className = "slippage-box" >
68- { slippage === " auto" ? "1" : slippage } %{ " " }
69- { slippage === " auto" ? t ( " auto" ) : "" }
68+ { slippage === ' auto' ? '1' : slippage } %{ ' ' }
69+ { slippage === ' auto' ? t ( ' auto' ) : '' }
7070 </ div >
7171 }
7272 />
7373 < SwapKeyValue
74- keyText = { t ( " blockchain_fee" ) }
74+ keyText = { t ( ' blockchain_fee' ) }
7575 value = {
7676 bestRoute ?. pool_data . blockchainFee ??
77- " 0 TON"
77+ ' 0 TON'
7878 }
7979 />
8080 < SwapKeyValue
81- keyText = { t ( " price_impact" ) }
81+ keyText = { t ( ' price_impact' ) }
8282 value = {
8383 < span data-testid = "price-impact" >
8484 { bestRoute
8585 ? bestRoute . pool_data . priceImpact +
86- "%"
87- : "0%" }
86+ '%'
87+ : '0%' }
8888 </ span >
8989 }
9090 />
9191 < SwapKeyValue
92- keyText = { t ( " minimum_received" ) }
92+ keyText = { t ( ' minimum_received' ) }
9393 value = {
9494 bestRoute ?. pool_data . minimumReceive_show ??
95- "0"
95+ '0'
9696 }
9797 />
9898 < SwapKeyValue
99- keyText = { t ( " route" ) }
99+ keyText = { t ( ' route' ) }
100100 value = {
101101 bestRoute ? (
102102 < div className = "route-container" >
@@ -111,16 +111,16 @@ const SwapDetails = () => {
111111 bestRoute
112112 . selected_pool
113113 . dex ===
114- " dedust"
115- ? " https://dedust.io/favicon-32x32.png"
116- : " https://ston.fi/images/tild3432-3236-4431-b139-376231383134__favicon.svg"
114+ ' dedust'
115+ ? ' https://dedust.io/favicon-32x32.png'
116+ : ' https://ston.fi/images/tild3432-3236-4431-b139-376231383134__favicon.svg'
117117 } )`,
118118 } }
119119 > </ div >
120120 { bestRoute . selected_pool . dex ===
121- " dedust"
122- ? " Dedust"
123- : " Ston.fi" }
121+ ' dedust'
122+ ? ' Dedust'
123+ : ' Ston.fi' }
124124 < BsArrowRightShort />
125125 </ span >
126126 < RouteView
@@ -131,7 +131,7 @@ const SwapDetails = () => {
131131 />
132132 </ div >
133133 ) : (
134- " Enter amount"
134+ ' Enter amount'
135135 )
136136 }
137137 />
@@ -145,10 +145,10 @@ const SwapDetails = () => {
145145
146146const RouteView : FC < { routes : string [ ] } > = ( { routes } ) => {
147147 return (
148- < span >
148+ < span className = "route-view-token" >
149149 { routes . map ( ( route , idx ) => (
150150 < >
151- { route } { " " }
151+ { route } { ' ' }
152152 { idx !== routes . length - 1 && (
153153 < BsChevronRight className = "route-icon" />
154154 ) }
0 commit comments