11import { ActionButton , Stack , Text } from "@namada/components" ;
22import { ConnectProviderButton } from "App/Common/ConnectProviderButton" ;
33import { CurrentStatus } from "App/Common/CurrentStatus" ;
4+ import { IconTooltip } from "App/Common/IconTooltip" ;
45import { InlineError } from "App/Common/InlineError" ;
56import { LedgerDeviceTooltip } from "App/Common/LedgerDeviceTooltip" ;
67import { SelectWalletModal } from "App/Common/SelectWalletModal" ;
@@ -17,6 +18,7 @@ import { getAssetImageUrl } from "integrations/utils";
1718import invariant from "invariant" ;
1819import { useAtom , useAtomValue } from "jotai" ;
1920import { useCallback , useEffect , useState } from "react" ;
21+ import { BsQuestionCircleFill } from "react-icons/bs" ;
2022import { toDisplayAmount } from "utils" ;
2123import { usePerformOsmosisSwapTx } from "./hooks/usePerformOsmosisSwapTx" ;
2224import { useSwapReviewValidation } from "./hooks/useSwapReviewValidation" ;
@@ -171,39 +173,45 @@ export const SwapReview = (): JSX.Element => {
171173 </ Stack >
172174 < hr className = "my-5 mx-2 border-white opacity-[5%]" />
173175 < Stack gap = { 3 } >
174- < Stack
175- direction = "horizontal"
176- className = "justify-between text-neutral-300 text-sm"
177- >
176+ < ReviewRow >
178177 < div > Swap Fee</ div >
179178 < p >
180179 { fiatFeeDisplay } ({ swapFee . toString ( ) } %)
181180 </ p >
182- </ Stack >
183- < Stack
184- direction = "horizontal"
185- className = "justify-between text-neutral-300 text-sm"
186- >
181+ </ ReviewRow >
182+ < ReviewRow >
187183 < div > Slippage tolerance</ div >
188184 < div > { SLIPPAGE * 100 } %</ div >
189- </ Stack >
190- < Stack
191- direction = "horizontal"
192- className = "justify-between text-neutral-300 text-sm"
193- >
185+ </ ReviewRow >
186+ < ReviewRow >
194187 < div > Receive at least</ div >
195188 < div >
196189 { receiveAtLeastDenominated . toString ( ) } { buyAsset . symbol }
197190 </ div >
198- </ Stack >
191+ </ ReviewRow >
199192 { walletAddress && (
200- < Stack
201- direction = "horizontal"
202- className = "justify-between text-neutral-300 text-sm"
203- >
204- < div > Local recovery address</ div >
193+ < ReviewRow >
194+ < Stack
195+ direction = "horizontal"
196+ className = "relative items-center"
197+ gap = { 2 }
198+ >
199+ Local recovery address
200+ < IconTooltip
201+ className = ""
202+ icon = {
203+ < BsQuestionCircleFill className = "w-4 h-4 text-yellow" />
204+ }
205+ text = {
206+ < span >
207+ This is the address where your assets will land in case
208+ something goes wrong on the destination chain.
209+ </ span >
210+ }
211+ />
212+ </ Stack >
205213 < WalletAddress address = { walletAddress } displayTooltip = { true } />
206- </ Stack >
214+ </ ReviewRow >
207215 ) }
208216 </ Stack >
209217 </ div >
@@ -263,6 +271,21 @@ export const SwapReview = (): JSX.Element => {
263271 ) ;
264272} ;
265273
274+ const ReviewRow = ( {
275+ children,
276+ } : {
277+ children : React . ReactNode ;
278+ } ) : JSX . Element => {
279+ return (
280+ < Stack
281+ direction = "horizontal"
282+ className = "justify-between text-neutral-300 text-sm"
283+ >
284+ { children }
285+ </ Stack >
286+ ) ;
287+ } ;
288+
266289const ValidationMessages : Record < string , string > = {
267290 NoWalletConnected : "Connect Keplr Wallet" ,
268291 LedgerDeviceNotConnected : "Connect your ledger and open the Namada App" ,
0 commit comments