fix(metadata): implement dynamic network url path routing for token page and social previews - #429
Merged
Conversation
|
@DevRushd Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Hi @DevRushd , kindly fix conflicts. Thanks |
DevRushd
force-pushed
the
fix/dynamic-token-metadata
branch
3 times, most recently
from
August 6, 2026 14:55
f8ecf2d to
0331745
Compare
…age and social previews
DevRushd
force-pushed
the
fix/dynamic-token-metadata
branch
from
August 7, 2026 13:40
0331745 to
18e859a
Compare
Contributor
Author
|
Hi @zachyo, I have fully resolved the conflict |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces hardcoded
NETWORKS.testnetreferences in three server-side entry points with path-based dynamic network routing. The network context is now carried directly in the URL path:/token/[network]/[contractId].Changes
Directory Restructure
frontend/app/token/[contractId]→frontend/app/token/[network]/[contractId]frontend/app/api/og/token/[contractId]→frontend/app/api/og/token/[network]/[contractId]frontend/app/api/token/[contractId]/metadata→frontend/app/api/token/[network]/[contractId]/metadataCode Changes
types/network.ts: AddedgetNetworkConfig(network: string)helper that maps"mainnet"→NETWORKS.mainnetand falls back toNETWORKS.testnettoken/[network]/[contractId]/page.tsx: Readsnetworkfrom URL params, usesgetNetworkConfigforvalidateTokenContractandfetchTokenInfocalls, updates OG image URLs to include network segmentapi/og/token/[network]/[contractId]/route.tsx: Readsnetworkfrom URL params, constructs network config dynamicallyapi/token/[network]/[contractId]/metadata/route.ts: Readsnetworkfrom URL params, constructs network config dynamicallyPublicTokenPage.tsx: Acceptsnetworkprop, syncs URL network withNetworkProvidercontext, fixesInvalidTokenContractimport pathCloses #401