Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromcunha committed Feb 14, 2024
2 parents 36c7a86 + 157ffad commit fe4caff
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 513 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@radix-ui/react-toggle-group": "^1.0.1",
"@radix-ui/react-tooltip": "1.0.6",
"@rainbow-me/rainbowkit": "1.3.1",
"@reservoir0x/reservoir-kit-ui": "1.25.7",
"@reservoir0x/reservoir-kit-ui": "1.25.9",
"@sentry/nextjs": "^7.85.0",
"@types/uuid": "^9.0.1",
"@vercel/og": "^0.5.20",
Expand Down
2 changes: 1 addition & 1 deletion pages/[chain]/asset/[assetId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ const IndexPage: NextPage<Props> = ({ assetId, ssr }) => {
? token.token.name
: `${token?.token?.tokenId} - ${token?.token?.collection?.name}`

const base64EncodedToken = btoa(JSON.stringify(token))
const base64EncodedToken = btoa(encodeURIComponent(JSON.stringify(token)))

return (
<Layout>
Expand Down
6 changes: 4 additions & 2 deletions pages/api/og/token/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export default async function handler(request: NextRequest) {
)
}

const token = JSON.parse(atob(base64EncodedToken)) as Token
const token = JSON.parse(
decodeURIComponent(atob(decodeURIComponent(base64EncodedToken)))
) as Token

return new ImageResponse(
(
Expand Down Expand Up @@ -178,7 +180,7 @@ export default async function handler(request: NextRequest) {
fontSize: '32px',
}}
>
ERC-721
{token.token?.kind?.toUpperCase()}
{' '}
<span style={{ color: '#687076', fontSize: '32px' }}>
on
Expand Down
Loading

0 comments on commit fe4caff

Please sign in to comment.