@@ -51,7 +51,7 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
5151 const {
5252 initializeTransactionCounter,
5353 incrementTransactionCount,
54- transactionCount ,
54+ currentTransactionNumber ,
5555 maxTransactions,
5656 isTransactionCounterInitialized,
5757 resetTransactionCounter
@@ -364,6 +364,7 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
364364 setIsError ( true )
365365 }
366366
367+ resetTransactionCounter ( )
367368 setIsPurchasing ( false )
368369 }
369370
@@ -531,6 +532,7 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
531532 }
532533
533534 setIsPurchasing ( false )
535+ resetTransactionCounter ( )
534536 }
535537
536538 const onClickPurchase = ( ) => {
@@ -590,21 +592,6 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
590592 )
591593 }
592594
593- const TransactionCounterInfo = ( ) => {
594- return (
595- < div className = "flex flex-row justify-between items-center w-full" >
596- < Text variant = "xsmall" color = "text50" >
597- { `${ transactionCount } / ${ maxTransactions } ` }
598- { isTransactionCounterInitialized && (
599- < Text variant = "xsmall" color = "text50" >
600- "counter initialized"
601- </ Text >
602- ) }
603- </ Text >
604- </ div >
605- )
606- }
607-
608595 if ( isLoading ) {
609596 return (
610597 < div className = "flex flex-col gap-3 justify-center items-center h-full pt-5" >
@@ -669,6 +656,23 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
669656 }
670657
671658 const PriceSection = ( ) => {
659+ if ( isTransactionCounterInitialized ) {
660+ const descriptionText =
661+ maxTransactions > 1
662+ ? `Confirming transaction ${ currentTransactionNumber } of ${ maxTransactions } `
663+ : `Confirming transaction`
664+ return (
665+ < div className = "flex flex-col flex-wrap justify-between items-center w-full gap-2" >
666+ < div className = "flex flex-col gap-0.5" >
667+ < Text variant = "xsmall" color = "text50" >
668+ { descriptionText }
669+ </ Text >
670+ </ div >
671+ < Spinner />
672+ </ div >
673+ )
674+ }
675+
672676 if ( isFree ) {
673677 return (
674678 < div className = "flex flex-col mt-2 mb-1 w-full" >
@@ -707,7 +711,6 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
707711
708712 return (
709713 < div className = "flex flex-row flex-wrap justify-between items-center w-full gap-2" >
710- < TransactionCounterInfo />
711714 < div className = "flex flex-col gap-0 min-w-0" >
712715 < Text
713716 variant = "xsmall"
0 commit comments