File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/thirdweb/src/react/web/ui/Bridge Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ export function TransactionPayment({
104104 const walletBalance = await getWalletBalance ( {
105105 address : activeAccount ?. address ,
106106 chain : uiOptions . transaction . chain ,
107- tokenAddress : erc20Value ?. tokenAddress ,
107+ tokenAddress : erc20Value ?. tokenAddress . toLowerCase ( ) !== NATIVE_TOKEN_ADDRESS ? erc20Value ?. tokenAddress : undefined ,
108108 client,
109109 } ) ;
110110
@@ -366,7 +366,7 @@ export function TransactionPayment({
366366 Math . max (
367367 0 ,
368368 Number ( transactionDataQuery . data . totalCost ) -
369- Number ( userBalance ) ,
369+ Number ( userBalance ?? "0" ) ,
370370 ) . toString ( ) ,
371371 transactionDataQuery . data . tokenInfo ,
372372 getAddress ( activeAccount . address ) ,
You can’t perform that action at this time.
0 commit comments