Skip to content

[SDK] Feature: Hide the TransactionWidget contract label if unknown #7642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/whole-bottles-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

TransactionWidget: Hides the "UnknownContract" label
38 changes: 22 additions & 16 deletions packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,22 +212,28 @@
<Spacer y="md" />

{/* Contract Info */}
<Container
flex="row"
style={{
alignItems: "center",
justifyContent: "space-between",
}}
>
<Text color="secondaryText" size="sm">
Contract
</Text>
<Text color="primaryText" size="sm">
{contractName}
</Text>
</Container>

<Spacer y="xs" />
{contractName !== "UnknownContract" &&
contractName !== undefined &&
contractName !== "Unknown Contract" && (
<>
<Container
flex="row"
style={{
alignItems: "center",
justifyContent: "space-between",
}}

Check warning on line 224 in packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx#L215-L224

Added lines #L215 - L224 were not covered by tests
>
<Text color="secondaryText" size="sm">

Check warning on line 226 in packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx#L226

Added line #L226 was not covered by tests
Contract
</Text>
<Text color="primaryText" size="sm">
{contractName}
</Text>
</Container>

Check warning on line 232 in packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx#L228-L232

Added lines #L228 - L232 were not covered by tests

<Spacer y="xs" />
</>

Check warning on line 235 in packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx#L234-L235

Added lines #L234 - L235 were not covered by tests
)}

{/* Address */}
<Container
Expand Down
Loading