-
Notifications
You must be signed in to change notification settings - Fork 621
Add activity log section to transaction page #7529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
9c44b45
1b2b3fa
6858fba
d5df1ec
933aa1d
a29b8c7
707076d
29310fb
ad64fb9
9a42ff8
6f18324
e82de0c
17dc805
c6c969f
0ece641
ecc5479
ccc3837
3a44bd7
91a8db8
b106e3d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # * | ||
| User-agent: * | ||
| Allow: / | ||
| Disallow: / | ||
|
|
||
| # Host | ||
| Host: https://thirdweb.com | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,8 +1,9 @@ | ||||||||||||||||||||||||||||||
| import { ImageResponse } from "next/og"; | ||||||||||||||||||||||||||||||
| import { useId } from "react"; | ||||||||||||||||||||||||||||||
| import { download } from "thirdweb/storage"; | ||||||||||||||||||||||||||||||
| import { serverThirdwebClient } from "@/constants/thirdweb-client.server"; | ||||||||||||||||||||||||||||||
| import { fetchChain } from "@/utils/fetchChain"; | ||||||||||||||||||||||||||||||
| import { DASHBOARD_THIRDWEB_SECRET_KEY } from "@/constants/server-envs"; | ||||||||||||||||||||||||||||||
| import { getConfiguredThirdwebClient } from "@/constants/thirdweb.server"; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add server-only import for server component. This is a server-side component that should include the Add this import at the top of the file: +import "server-only";
import { ImageResponse } from "next/og";📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| // Route segment config | ||||||||||||||||||||||||||||||
| export const runtime = "edge"; | ||||||||||||||||||||||||||||||
|
|
@@ -81,16 +82,29 @@ export default async function Image({ | |||||||||||||||||||||||||||||
| fetch(new URL("og-lib/fonts/inter/700.ttf", import.meta.url)).then((res) => | ||||||||||||||||||||||||||||||
| res.arrayBuffer(), | ||||||||||||||||||||||||||||||
| ), | ||||||||||||||||||||||||||||||
| // download the chain icon if there is one | ||||||||||||||||||||||||||||||
| chain.icon?.url && hasWorkingChainIcon | ||||||||||||||||||||||||||||||
| ? download({ | ||||||||||||||||||||||||||||||
| client: serverThirdwebClient, | ||||||||||||||||||||||||||||||
| uri: chain.icon.url, | ||||||||||||||||||||||||||||||
| }).then((res) => res.arrayBuffer()) | ||||||||||||||||||||||||||||||
| // download the chain icon if there is one and secret key is available | ||||||||||||||||||||||||||||||
| chain.icon?.url && hasWorkingChainIcon && DASHBOARD_THIRDWEB_SECRET_KEY | ||||||||||||||||||||||||||||||
| ? (async () => { | ||||||||||||||||||||||||||||||
| try { | ||||||||||||||||||||||||||||||
| const client = getConfiguredThirdwebClient({ | ||||||||||||||||||||||||||||||
| secretKey: DASHBOARD_THIRDWEB_SECRET_KEY, | ||||||||||||||||||||||||||||||
| teamId: undefined, | ||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||
| const response = await download({ | ||||||||||||||||||||||||||||||
| client, | ||||||||||||||||||||||||||||||
| uri: chain.icon?.url || "", | ||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||
| return response.arrayBuffer(); | ||||||||||||||||||||||||||||||
| } catch (error) { | ||||||||||||||||||||||||||||||
| // If download fails, return undefined to fallback to no icon | ||||||||||||||||||||||||||||||
| console.warn("Failed to download chain icon:", error); | ||||||||||||||||||||||||||||||
| return undefined; | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| })() | ||||||||||||||||||||||||||||||
| : undefined, | ||||||||||||||||||||||||||||||
| // download the background image (based on chain) | ||||||||||||||||||||||||||||||
| fetch( | ||||||||||||||||||||||||||||||
| chain.icon?.url && hasWorkingChainIcon | ||||||||||||||||||||||||||||||
| chain.icon?.url && hasWorkingChainIcon && DASHBOARD_THIRDWEB_SECRET_KEY | ||||||||||||||||||||||||||||||
| ? new URL( | ||||||||||||||||||||||||||||||
| "og-lib/assets/chain/bg-with-icon.png", | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
|
|
@@ -118,7 +132,7 @@ export default async function Image({ | |||||||||||||||||||||||||||||
| /> | ||||||||||||||||||||||||||||||
| {/* the actual component starts here */} | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| {hasWorkingChainIcon && ( | ||||||||||||||||||||||||||||||
| {hasWorkingChainIcon && chainIcon && ( | ||||||||||||||||||||||||||||||
| <img | ||||||||||||||||||||||||||||||
| alt="" | ||||||||||||||||||||||||||||||
| // @ts-expect-error - TS doesn't know about the ImageResponse component | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.