Skip to content

Commit 8b6dead

Browse files
authored
[Dashboard] Feature: Adds paired address for expedited token route finding (#7892)
1 parent 6d635dc commit 8b6dead

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/_apis/create-token-on-bridge.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ import { isProd } from "@/constants/env-utils";
44
export async function createTokenOnUniversalBridge(params: {
55
chainId: number;
66
tokenAddress: string;
7+
pairedTokenAddress?: string;
78
client: ThirdwebClient;
89
}) {
910
const domain = isProd ? "thirdweb.com" : "thirdweb-dev.com";
1011
const res = await fetch(`https://bridge.${domain}/v1/tokens`, {
1112
body: JSON.stringify({
1213
chainId: params.chainId.toString(),
1314
tokenAddress: params.tokenAddress,
15+
pairedTokenAddress: params.pairedTokenAddress,
1416
}),
1517
headers: {
1618
"Content-Type": "application/json",

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/tokens/create/token/create-token-page-impl.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,8 @@ export function CreateTokenAssetPage(props: {
445445
chainId: params.chainId,
446446
client: props.client,
447447
tokenAddress: params.contractAddress,
448+
// TODO: UPDATE THIS WHEN WE ALLOW CUSTOM CURRENCY PAIRING
449+
pairedTokenAddress: NATIVE_TOKEN_ADDRESS,
448450
});
449451
revalidatePathAction(
450452
`/team/${props.teamSlug}/project/${props.projectId}/tokens`,

0 commit comments

Comments
 (0)