diff --git a/.changeset/forty-cameras-judge.md b/.changeset/forty-cameras-judge.md new file mode 100644 index 00000000..4820c849 --- /dev/null +++ b/.changeset/forty-cameras-judge.md @@ -0,0 +1,5 @@ +--- +"stackspulse": patch +--- + +Fix tokens page to not include the identifier in the URL. diff --git a/apps/web/src/app/tokens/[token]/page.tsx b/apps/web/src/app/tokens/[token]/page.tsx index 437544ce..e89947dc 100644 --- a/apps/web/src/app/tokens/[token]/page.tsx +++ b/apps/web/src/app/tokens/[token]/page.tsx @@ -14,9 +14,8 @@ interface PageProps { } export default async function ProtocolPage({ params }: PageProps) { - const token = decodeURIComponent(params.token); const tokenInfo = await stacksTokensApi - .getFtMetadata(token.split("::")[0]) + .getFtMetadata(params.token) .catch((error) => { if (error.status === 404) { return null; @@ -27,6 +26,10 @@ export default async function ProtocolPage({ params }: PageProps) { notFound(); } + // TODO change once https://github.com/hirosystems/token-metadata-api/issues/268 is fixed + const token = (tokenInfo as unknown as { asset_identifier: string }) + .asset_identifier; + return (