Skip to content

Commit 3bf78e7

Browse files
committed
fix: use const native address
1 parent d3fca9a commit 3bf78e7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routelist-card.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Card, CardContent, CardHeader } from "@/components/ui/card";
22
import { getThirdwebClient } from "@/constants/thirdweb.server";
33
import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler";
4-
import { defineChain, getContract } from "thirdweb";
4+
import { defineChain, getContract, NATIVE_TOKEN_ADDRESS } from "thirdweb";
55
import { getChainMetadata } from "thirdweb/chains";
66
import { name } from "thirdweb/extensions/common";
77

@@ -32,7 +32,7 @@ export async function RouteListCard({
3232
] = await Promise.all([
3333
// eslint-disable-next-line no-restricted-syntax
3434
getChainMetadata(defineChain(originChainId)),
35-
originTokenAddress === "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
35+
originTokenAddress.toLowerCase() === NATIVE_TOKEN_ADDRESS
3636
? "ETH"
3737
: name({
3838
contract: getContract({
@@ -43,7 +43,7 @@ export async function RouteListCard({
4343
}).catch(() => undefined),
4444
// eslint-disable-next-line no-restricted-syntax
4545
getChainMetadata(defineChain(destinationChainId)),
46-
destinationTokenAddress === "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
46+
destinationTokenAddress.toLowerCase() === NATIVE_TOKEN_ADDRESS
4747
? "ETH"
4848
: name({
4949
contract: getContract({

apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CopyTextButton } from "@/components/ui/CopyTextButton";
22
import { TableCell, TableRow } from "@/components/ui/table";
33
import { getThirdwebClient } from "@/constants/thirdweb.server";
44
import { resolveSchemeWithErrorHandler } from "@/lib/resolveSchemeWithErrorHandler";
5-
import { getContract } from "thirdweb";
5+
import { getContract, NATIVE_TOKEN_ADDRESS } from "thirdweb";
66
import { defineChain, getChainMetadata } from "thirdweb/chains";
77
import { symbol } from "thirdweb/extensions/common";
88

@@ -33,7 +33,7 @@ export async function RouteListRow({
3333
] = await Promise.all([
3434
// eslint-disable-next-line no-restricted-syntax
3535
getChainMetadata(defineChain(originChainId)),
36-
originTokenAddress === "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
36+
originTokenAddress.toLowerCase() === NATIVE_TOKEN_ADDRESS
3737
? "ETH"
3838
: symbol({
3939
contract: getContract({
@@ -44,7 +44,7 @@ export async function RouteListRow({
4444
}).catch(() => undefined),
4545
// eslint-disable-next-line no-restricted-syntax
4646
getChainMetadata(defineChain(destinationChainId)),
47-
destinationTokenAddress === "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
47+
destinationTokenAddress.toLowerCase() === NATIVE_TOKEN_ADDRESS
4848
? "ETH"
4949
: symbol({
5050
contract: getContract({

0 commit comments

Comments
 (0)