File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ export function SwapConfirmCard({ formValues }: Props) {
147
147
return
148
148
}
149
149
150
- if ( sendApproveTx ) {
150
+ if ( ! skipApprove && sendApproveTx ) {
151
151
try {
152
152
logger . info ( 'Sending approve tx' )
153
153
const approveResult = await sendApproveTx ( )
@@ -251,7 +251,7 @@ export function SwapConfirmCard({ formValues }: Props) {
251
251
close = { ( ) => setIsModalOpen ( false ) }
252
252
width = "max-w-[432px]"
253
253
>
254
- < MentoLogoLoader needsApproval = { needsApproval } />
254
+ < MentoLogoLoader skipApprove = { skipApprove } />
255
255
</ Modal >
256
256
</ FloatingBox >
257
257
)
@@ -329,7 +329,7 @@ const ChevronRight = (props: SVGProps<SVGSVGElement>) => (
329
329
</ svg >
330
330
)
331
331
332
- const MentoLogoLoader = ( { needsApproval } : { needsApproval : boolean } ) => {
332
+ const MentoLogoLoader = ( { skipApprove } : { skipApprove : boolean } ) => {
333
333
const { connector } = useAccount ( )
334
334
335
335
return (
@@ -345,9 +345,7 @@ const MentoLogoLoader = ({ needsApproval }: { needsApproval: boolean }) => {
345
345
346
346
< div className = "my-6" >
347
347
< div className = "text-sm text-center text-[#636768] dark:text-[#AAB3B6]" >
348
- { needsApproval
349
- ? 'Sending two transactions: Approve and Swap'
350
- : 'Sending swap transaction' }
348
+ { skipApprove ? 'Sending swap transaction' : 'Sending two transactions: Approve and Swap' }
351
349
</ div >
352
350
< div className = "mt-3 text-sm text-center text-[#636768] dark:text-[#AAB3B6]" >
353
351
{ `Sign with ${ connector ?. name || 'wallet' } to proceed` }
You can’t perform that action at this time.
0 commit comments