@@ -81,7 +81,9 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
8181 chainId : chain
8282 }
8383
84+ // Check if the target currency (what the item is priced in) is native
8485 const isNativeToken = compareAddress ( currencyAddress , zeroAddress )
86+ // Check if the selected currency (what the user is paying with) is native
8587 const isNativeTokenSelectedCurrency = compareAddress ( selectedCurrency . address , zeroAddress )
8688
8789 const { data : tokenBalancesData , isLoading : tokenBalancesIsLoading } = useGetTokenBalancesSummary ( {
@@ -163,14 +165,14 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
163165 address : currencyAddress as Hex ,
164166 args : [ userAddress , approvedSpenderAddress || targetContractAddress ] ,
165167 query : {
166- enabled : ! ! userAddress && ! isNativeTokenSelectedCurrency
168+ enabled : ! ! userAddress && ! isNativeToken
167169 }
168170 } )
169171
170172 const isLoading =
171173 isLoadingCoinPrice ||
172174 isLoadingCurrencyInfo ||
173- ( allowanceIsLoading && ! isNativeTokenSelectedCurrency ) ||
175+ ( allowanceIsLoading && ! isNativeToken ) ||
174176 isLoadingSwapQuote ||
175177 tokenBalancesIsLoading ||
176178 isLoadingSelectedCurrencyInfo
@@ -352,7 +354,7 @@ export const PayWithCryptoTab = ({ skipOnCloseCallback, isSwitchingChainRef }: P
352354 : { } )
353355 } ,
354356 // Actual transaction optional approve step
355- ...( isApproved || isNativeTokenSelectedCurrency
357+ ...( isApproved || isNativeToken
356358 ? [ ]
357359 : [
358360 {
0 commit comments