-
Notifications
You must be signed in to change notification settings - Fork 607
Resolve TokenIcon automatically when available #8279
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
Resolve TokenIcon automatically when available #8279
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
🦋 Changeset detectedLatest commit: f6916be The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
WalkthroughThis PR adds many new API client endpoints (auth linking, x402 payments, bridge, fiat-to-crypto, Solana wallets), adds bridge-token icon resolution in TokenIcon by fetching token data, and removes hard-coded iconResolver props from playground TokenIcon examples. Changesets for patch releases were added. Changes
Sequence Diagram(s)sequenceDiagram
participant UI as TokenIcon component
participant NativeCheck as Native token check
participant Bridge as Bridge token resolver (getToken)
participant Contract as Contract metadata resolver
participant Output as Icon result
Note over UI,Output: Token icon resolution (updated)
UI->>NativeCheck: Is native token?
alt native
NativeCheck->>Output: return native icon
else not native
UI->>Bridge: fetch token via getToken(address, chainId)
alt bridge token has iconUri
Bridge->>Output: return bridge token iconUri (early exit)
else no bridge icon
UI->>Contract: query contract metadata for icon
Contract->>Output: return contract icon or fallback
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Comment |
db56edf to
66b1322
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8279 +/- ##
==========================================
- Coverage 55.01% 54.89% -0.13%
==========================================
Files 919 919
Lines 60588 60622 +34
Branches 4126 4128 +2
==========================================
- Hits 33334 33276 -58
- Misses 27150 27246 +96
+ Partials 104 100 -4
🚀 New features to boost your workflow:
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (6)
.changeset/sharp-bats-pump.md(1 hunks).changeset/shy-pillows-turn.md(1 hunks)apps/playground-web/src/components/headless-ui/token-examples.tsx(0 hunks)apps/playground-web/src/components/headless-ui/token-previews.tsx(1 hunks)packages/api/src/client/sdk.gen.ts(12 hunks)packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx(2 hunks)
💤 Files with no reviewable changes (1)
- apps/playground-web/src/components/headless-ui/token-examples.tsx
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsxapps/playground-web/src/components/headless-ui/token-previews.tsxpackages/api/src/client/sdk.gen.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsxapps/playground-web/src/components/headless-ui/token-previews.tsxpackages/api/src/client/sdk.gen.ts
packages/thirdweb/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling@exampleand a custom tag (@beta,@internal,@experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g.,const { jsPDF } = await import("jspdf"))
Files:
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
.changeset/*.md: Each change inpackages/*must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API
Files:
.changeset/sharp-bats-pump.md.changeset/shy-pillows-turn.md
apps/{dashboard,playground-web}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/{dashboard,playground-web}/**/*.{ts,tsx}: Import UI primitives from@/components/ui/*(Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
UseNavLinkfor internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Usecn()from@/lib/utilsfor conditional class logic
Use design system tokens (e.g.,bg-card,border-border,text-muted-foreground)
Server Components (Node edge): Start files withimport "server-only";
Client Components (browser): Begin files with'use client';
Always callgetAuthToken()to retrieve JWT from cookies on server side
UseAuthorization: Bearerheader – never embed tokens in URLs
Return typed results (e.g.,Project[],User[]) – avoidany
Wrap client-side data fetching calls in React Query (@tanstack/react-query)
Use descriptive, stablequeryKeysfor React Query cache hits
ConfigurestaleTime/cacheTimein React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never importposthog-jsin server components
Files:
apps/playground-web/src/components/headless-ui/token-previews.tsx
🧠 Learnings (1)
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Version bump rules: patch for non‑API changes; minor for new/modified public API
Applied to files:
.changeset/shy-pillows-turn.md
🧬 Code graph analysis (3)
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx (1)
packages/thirdweb/src/pay/convert/get-token.ts (1)
getToken(6-37)
apps/playground-web/src/components/headless-ui/token-previews.tsx (1)
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx (1)
TokenIcon(113-193)
packages/api/src/client/sdk.gen.ts (2)
packages/api/src/client/client/types.ts (1)
Options(191-199)packages/api/src/client/types.gen.ts (48)
LinkAuthenticationData(343-357)LinkAuthenticationResponses(378-552)LinkAuthenticationErrors(359-376)UnlinkAuthenticationData(557-610)UnlinkAuthenticationResponses(631-805)UnlinkAuthenticationErrors(612-629)VerifyX402PaymentData(4881-4947)VerifyX402PaymentResponses(4964-5011)VerifyX402PaymentErrors(4949-4962)SettleX402PaymentData(5016-5086)SettleX402PaymentResponses(5103-5161)SettleX402PaymentErrors(5088-5101)SupportedX402PaymentsData(5166-5180)SupportedX402PaymentsResponses(5193-5240)SupportedX402PaymentsErrors(5182-5191)FetchWithPaymentData(5245-5287)FetchWithPaymentResponses(5479-5484)FetchWithPaymentErrors(5289-5474)ListPayableServicesData(5486-5502)ListPayableServicesResponses(5515-5563)ListPayableServicesErrors(5504-5513)GetBridgeChainsData(5869-5874)GetBridgeChainsResponses(5887-5927)GetBridgeChainsErrors(5876-5885)GetBridgeSupportedRoutesData(5932-5966)GetBridgeSupportedRoutesResponses(5983-6097)GetBridgeSupportedRoutesErrors(5968-5981)ConvertFiatToCryptoData(6102-6147)ConvertFiatToCryptoResponses(6172-6182)ConvertFiatToCryptoErrors(6149-6170)ListSolanaWalletsData(6453-6467)ListSolanaWalletsResponses(6480-6526)ListSolanaWalletsErrors(6469-6478)CreateSolanaWalletData(6531-6544)CreateSolanaWalletResponses(6557-6610)CreateSolanaWalletErrors(6546-6555)SignSolanaMessageData(6615-6632)SignSolanaMessageResponses(6645-6657)SignSolanaMessageErrors(6634-6643)SendSolanaTokensData(6662-6691)SendSolanaTokensResponses(6704-6727)SendSolanaTokensErrors(6693-6702)SendSolanaTransactionData(6732-6783)SendSolanaTransactionResponses(6796-6819)SendSolanaTransactionErrors(6785-6794)GetSolanaTransactionData(6824-6834)GetSolanaTransactionResponses(6851-6920)GetSolanaTransactionErrors(6836-6849)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Size
- GitHub Check: Unit Tests
🔇 Additional comments (9)
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx (2)
9-9: LGTM: Import added for enhanced icon resolution.The import of
getTokenenables the new bridge token icon resolution feature.
139-145: LGTM: Bridge token icon resolution added with appropriate fallback.The new resolution flow appropriately attempts to fetch bridge token data before falling back to contract metadata. The error handling with
.catch(() => null)is reasonable for this fallback scenario, allowing graceful degradation when bridge token data is unavailable.Icon resolution order is now:
- Explicit
iconResolver(string or function)- Native token (chain metadata)
- Bridge token (via
getToken- new)- Contract metadata (fallback)
This enhancement aligns with the PR objective to resolve TokenIcon automatically when available.
packages/api/src/client/sdk.gen.ts (5)
18-20: LGTM: Type imports added for new API endpoints.All necessary type imports for the new authentication linking, x402 payment, bridge, fiat-to-crypto, and Solana wallet endpoints are properly included.
Also applies to: 27-29, 39-47, 66-68, 90-92, 96-98, 102-104, 124-129, 136-138, 142-144, 150-152, 154-155, 156-158
290-364: LGTM: Authentication linking endpoints added with comprehensive documentation.The
linkAuthenticationandunlinkAuthenticationendpoints are well-documented and follow the established patterns in the SDK. Security configuration correctly requires both client authentication and bearer token.
1187-1330: LGTM: X402 payment endpoints added with appropriate security.The x402 payment flow endpoints (
verifyX402Payment,settleX402Payment,supportedX402Payments,fetchWithPayment,listPayableServices) are consistently implemented with:
- Proper security configurations
- Comprehensive documentation
- Appropriate error types
- Standard request/response patterns
The
fetchWithPaymentendpoint correctly usesContent-Type: */*to support pass-through of arbitrary content types.
1427-1502: LGTM: Bridge and fiat conversion endpoints added.The bridge-related endpoints (
getBridgeChains,getBridgeSupportedRoutes,convertFiatToCrypto) provide necessary functionality for cross-chain operations with proper authentication and documentation.
1537-1701: LGTM: Solana wallet endpoints added with backend authentication.All Solana wallet management endpoints (
listSolanaWallets,createSolanaWallet,signSolanaMessage,sendSolanaTokens,sendSolanaTransaction,getSolanaTransaction) correctly requirex-secret-keyauthentication, ensuring these backend-only operations remain secure..changeset/sharp-bats-pump.md (1)
1-5: LGTM: Appropriate patch version for internal enhancement.The patch version bump is correct since the TokenIcon enhancement is an internal implementation improvement with no breaking changes to the public API surface.
apps/playground-web/src/components/headless-ui/token-previews.tsx (1)
34-34: LGTM: Relying on automatic icon resolution.Removing the explicit
iconResolver="/usdc.svg"prop demonstrates the improved automatic icon resolution introduced in this PR. The TokenIcon component will now fetch the USDC icon automatically via the bridge token data path.
66b1322 to
f6916be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
apps/playground-web/src/components/headless-ui/token-previews.tsx (1)
27-37: Consider renamingTokenImageOverridePreviewto reflect its actual behavior.The function name suggests it demonstrates icon override functionality, but it no longer uses the
iconResolverprop. Consider renaming to something likeTokenImageUsdcPrevieworTokenImageErc20Previewto better describe that it demonstrates rendering an ERC-20 token (USDC) rather than the native token.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (6)
.changeset/sharp-bats-pump.md(1 hunks).changeset/shy-pillows-turn.md(1 hunks)apps/playground-web/src/components/headless-ui/token-examples.tsx(0 hunks)apps/playground-web/src/components/headless-ui/token-previews.tsx(1 hunks)packages/api/src/client/sdk.gen.ts(12 hunks)packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx(2 hunks)
💤 Files with no reviewable changes (1)
- apps/playground-web/src/components/headless-ui/token-examples.tsx
✅ Files skipped from review due to trivial changes (1)
- .changeset/sharp-bats-pump.md
🧰 Additional context used
📓 Path-based instructions (5)
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
.changeset/*.md: Each change inpackages/*must include a changeset for the appropriate package
Version bump rules: patch for non‑API changes; minor for new/modified public API
Files:
.changeset/shy-pillows-turn.md
**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial,Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
**/*.{ts,tsx}: Use explicit function declarations and explicit return types in TypeScript
Limit each file to one stateless, single‑responsibility function
Re‑use shared types from@/typeswhere applicable
Prefertypealiases overinterfaceexcept for nominal shapes
Avoidanyandunknownunless unavoidable; narrow generics when possible
Prefer composition over inheritance; use utility types (Partial, Pick, etc.)
Lazy‑import optional features and avoid top‑level side‑effects to reduce bundle size
Files:
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsxpackages/api/src/client/sdk.gen.tsapps/playground-web/src/components/headless-ui/token-previews.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)
Files:
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsxpackages/api/src/client/sdk.gen.tsapps/playground-web/src/components/headless-ui/token-previews.tsx
packages/thirdweb/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
packages/thirdweb/**/*.{ts,tsx}: Every public symbol must have comprehensive TSDoc with at least one compiling@exampleand a custom tag (@beta,@internal,@experimental, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose
Lazy‑load heavy dependencies inside async paths (e.g.,const { jsPDF } = await import("jspdf"))
Files:
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
apps/{dashboard,playground-web}/**/*.{ts,tsx}: Import UI primitives from@/components/ui/*(Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
UseNavLinkfor internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Usecn()from@/lib/utilsfor conditional class logic
Use design system tokens (e.g.,bg-card,border-border,text-muted-foreground)
Server Components (Node edge): Start files withimport "server-only";
Client Components (browser): Begin files with'use client';
Always callgetAuthToken()to retrieve JWT from cookies on server side
UseAuthorization: Bearerheader – never embed tokens in URLs
Return typed results (e.g.,Project[],User[]) – avoidany
Wrap client-side data fetching calls in React Query (@tanstack/react-query)
Use descriptive, stablequeryKeysfor React Query cache hits
ConfigurestaleTime/cacheTimein React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never importposthog-jsin server components
Files:
apps/playground-web/src/components/headless-ui/token-previews.tsx
🧠 Learnings (1)
📚 Learning: 2025-08-29T15:37:38.513Z
Learnt from: CR
PR: thirdweb-dev/js#0
File: AGENTS.md:0-0
Timestamp: 2025-08-29T15:37:38.513Z
Learning: Applies to .changeset/*.md : Version bump rules: patch for non‑API changes; minor for new/modified public API
Applied to files:
.changeset/shy-pillows-turn.md
🧬 Code graph analysis (3)
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx (1)
packages/thirdweb/src/pay/convert/get-token.ts (1)
getToken(6-37)
packages/api/src/client/sdk.gen.ts (2)
packages/api/src/client/client/types.ts (1)
Options(191-199)packages/api/src/client/types.gen.ts (48)
LinkAuthenticationData(343-357)LinkAuthenticationResponses(378-552)LinkAuthenticationErrors(359-376)UnlinkAuthenticationData(557-610)UnlinkAuthenticationResponses(631-805)UnlinkAuthenticationErrors(612-629)VerifyX402PaymentData(4881-4947)VerifyX402PaymentResponses(4964-5011)VerifyX402PaymentErrors(4949-4962)SettleX402PaymentData(5016-5086)SettleX402PaymentResponses(5103-5161)SettleX402PaymentErrors(5088-5101)SupportedX402PaymentsData(5166-5180)SupportedX402PaymentsResponses(5193-5240)SupportedX402PaymentsErrors(5182-5191)FetchWithPaymentData(5245-5287)FetchWithPaymentResponses(5479-5484)FetchWithPaymentErrors(5289-5474)ListPayableServicesData(5486-5502)ListPayableServicesResponses(5515-5563)ListPayableServicesErrors(5504-5513)GetBridgeChainsData(5869-5874)GetBridgeChainsResponses(5887-5927)GetBridgeChainsErrors(5876-5885)GetBridgeSupportedRoutesData(5932-5966)GetBridgeSupportedRoutesResponses(5983-6097)GetBridgeSupportedRoutesErrors(5968-5981)ConvertFiatToCryptoData(6102-6147)ConvertFiatToCryptoResponses(6172-6182)ConvertFiatToCryptoErrors(6149-6170)ListSolanaWalletsData(6453-6467)ListSolanaWalletsResponses(6480-6526)ListSolanaWalletsErrors(6469-6478)CreateSolanaWalletData(6531-6544)CreateSolanaWalletResponses(6557-6610)CreateSolanaWalletErrors(6546-6555)SignSolanaMessageData(6615-6632)SignSolanaMessageResponses(6645-6657)SignSolanaMessageErrors(6634-6643)SendSolanaTokensData(6662-6691)SendSolanaTokensResponses(6704-6727)SendSolanaTokensErrors(6693-6702)SendSolanaTransactionData(6732-6783)SendSolanaTransactionResponses(6796-6819)SendSolanaTransactionErrors(6785-6794)GetSolanaTransactionData(6824-6834)GetSolanaTransactionResponses(6851-6920)GetSolanaTransactionErrors(6836-6849)
apps/playground-web/src/components/headless-ui/token-previews.tsx (1)
packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx (1)
TokenIcon(113-193)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Size
- GitHub Check: Lint Packages
- GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
.changeset/shy-pillows-turn.md (1)
1-5: ✅ Version bump corrected to "minor".The changeset now correctly marks the version bump as "minor" for the
@thirdweb-dev/apipackage, which is appropriate given the PR adds multiple new public API endpoints (authentication linking, x402 payments, bridge operations, Solana wallet methods) that expand the public API surface. This aligns with the coding guideline requiring "minor" bumps for new/modified public API.packages/thirdweb/src/react/web/ui/prebuilt/Token/icon.tsx (2)
9-9: LGTM: Import addition is appropriate.The
getTokenimport is necessary for the new bridge token resolution feature and correctly placed.
139-145: LGTM: Bridge token resolution enhances icon accuracy.The implementation correctly adds an optional resolution step for bridge tokens. The error handling with
.catch(() => null)is appropriate for this waterfall pattern—if the bridge token is unavailable or unsupported, the code gracefully falls back to the existing contract metadata path. ThegetTokenfunction includes built-in caching, ensuring reasonable performance.
| /** | ||
| * Get Solana Transaction | ||
| * Retrieve the status and details of a queued Solana transaction using the identifier returned when the transaction was submitted. | ||
| * | ||
| * **Authentication**: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly. | ||
| */ | ||
| export const getSolanaTransaction = <ThrowOnError extends boolean = false>( | ||
| options: Options<GetSolanaTransactionData, ThrowOnError>, | ||
| ) => { | ||
| return (options.client ?? _heyApiClient).get< | ||
| GetSolanaTransactionResponses, | ||
| GetSolanaTransactionErrors, | ||
| ThrowOnError | ||
| >({ | ||
| security: [ | ||
| { | ||
| name: "x-secret-key", | ||
| type: "apiKey", | ||
| }, | ||
| ], | ||
| url: "/v1/solana/transactions/:transactionId", | ||
| ...options, | ||
| }); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix inconsistent path parameter format in URL.
The URL at line 1698 uses :transactionId (colon-prefix) instead of {transactionId} (curly braces), which is inconsistent with all other path parameters in this file.
Compare with similar endpoints:
- Line 1035:
"/v1/transactions/{transactionId}" - Line 604:
"/v1/wallets/{address}/balance" - Line 931:
"/v1/contracts/{chainId}/{address}/transactions"
Since this is an auto-generated file, the fix should be applied to the OpenAPI specification or code generator configuration:
- url: "/v1/solana/transactions/:transactionId",
+ url: "/v1/solana/transactions/{transactionId}",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /** | |
| * Get Solana Transaction | |
| * Retrieve the status and details of a queued Solana transaction using the identifier returned when the transaction was submitted. | |
| * | |
| * **Authentication**: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly. | |
| */ | |
| export const getSolanaTransaction = <ThrowOnError extends boolean = false>( | |
| options: Options<GetSolanaTransactionData, ThrowOnError>, | |
| ) => { | |
| return (options.client ?? _heyApiClient).get< | |
| GetSolanaTransactionResponses, | |
| GetSolanaTransactionErrors, | |
| ThrowOnError | |
| >({ | |
| security: [ | |
| { | |
| name: "x-secret-key", | |
| type: "apiKey", | |
| }, | |
| ], | |
| url: "/v1/solana/transactions/:transactionId", | |
| ...options, | |
| }); | |
| }; | |
| /** | |
| * Get Solana Transaction | |
| * Retrieve the status and details of a queued Solana transaction using the identifier returned when the transaction was submitted. | |
| * | |
| * **Authentication**: This endpoint requires backend authentication using the x-secret-key header. The secret key should never be exposed publicly. | |
| */ | |
| export const getSolanaTransaction = <ThrowOnError extends boolean = false>( | |
| options: Options<GetSolanaTransactionData, ThrowOnError>, | |
| ) => { | |
| return (options.client ?? _heyApiClient).get< | |
| GetSolanaTransactionResponses, | |
| GetSolanaTransactionErrors, | |
| ThrowOnError | |
| >({ | |
| security: [ | |
| { | |
| name: "x-secret-key", | |
| type: "apiKey", | |
| }, | |
| ], | |
| url: "/v1/solana/transactions/{transactionId}", | |
| ...options, | |
| }); | |
| }; |
🤖 Prompt for AI Agents
In packages/api/src/client/sdk.gen.ts around lines 1678 to 1701 the path
parameter is using colon-prefixed syntax
"/v1/solana/transactions/:transactionId" which is inconsistent with the
project's curly-brace style; update the source (OpenAPI spec or codegen
template/config) so the generated URL uses
"/v1/solana/transactions/{transactionId}" and regenerate the client (or change
the generator mapping for path parameter templates) to ensure all endpoints use
the {param} format.

PR-Codex overview
This PR focuses on enhancing the
TokenIconcomponent and expanding the API with new payment and wallet functionalities, including support for Solana wallets and improved token handling.Detailed summary
TokenIconto automatically resolve token icons.Summary by CodeRabbit