File tree Expand file tree Collapse file tree 2 files changed +25
-16
lines changed
packages/thirdweb/src/react/web/ui/Bridge Expand file tree Collapse file tree 2 files changed +25
-16
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ TransactionWidget: Hides the "UnknownContract" label
Original file line number Diff line number Diff line change @@ -212,22 +212,26 @@ export function TransactionPayment({
212212 < Spacer y = "md" />
213213
214214 { /* Contract Info */ }
215- < Container
216- flex = "row"
217- style = { {
218- alignItems : "center" ,
219- justifyContent : "space-between" ,
220- } }
221- >
222- < Text color = "secondaryText" size = "sm" >
223- Contract
224- </ Text >
225- < Text color = "primaryText" size = "sm" >
226- { contractName }
227- </ Text >
228- </ Container >
215+ { contractName !== "UnknownContract" && contractName !== undefined && contractName !== "Unknown Contract" && (
216+ < >
217+ < Container
218+ flex = "row"
219+ style = { {
220+ alignItems : "center" ,
221+ justifyContent : "space-between" ,
222+ } }
223+ >
224+ < Text color = "secondaryText" size = "sm" >
225+ Contract
226+ </ Text >
227+ < Text color = "primaryText" size = "sm" >
228+ { contractName }
229+ </ Text >
230+ </ Container >
229231
230- < Spacer y = "xs" />
232+ < Spacer y = "xs" />
233+ </ >
234+ ) }
231235
232236 { /* Address */ }
233237 < Container
@@ -359,7 +363,7 @@ export function TransactionPayment({
359363 Math . max (
360364 0 ,
361365 Number ( transactionDataQuery . data . totalCost ) -
362- Number ( userBalance ?? "0" ) ,
366+ Number ( userBalance ?? "0" ) ,
363367 ) . toString ( ) ,
364368 transactionDataQuery . data . tokenInfo ,
365369 getAddress ( activeAccount . address ) ,
You can’t perform that action at this time.
0 commit comments