-
Notifications
You must be signed in to change notification settings - Fork 31
wallets: merge main into wallets-v1 #1659
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
base: wallets-v1
Are you sure you want to change the base?
Changes from all commits
07ee672
92c894a
464292b
402001f
e912d18
824f56f
e3200ac
1e3663d
9a8a0bc
024e6e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,11 @@ | ||
| # crossmint-auth-node | ||
|
|
||
| ## 1.1.74 | ||
|
|
||
| ### Patch Changes | ||
|
|
||
| - @crossmint/server-sdk@1.2.63 | ||
|
|
||
| ## 1.1.73 | ||
|
|
||
| ### Patch Changes | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,16 @@ | ||
| import type { CrossmintHostedCheckoutV3Props } from "@/types/hosted/v3/CrossmintHostedCheckoutV3Props"; | ||
| import { | ||
| type CrossmintHostedCheckoutV3AllProps, | ||
| isHostedCheckoutV3ExistingOrderProps, | ||
| type CrossmintHostedCheckoutV3OrderProps, | ||
| } from "@/types/hosted/v3/CrossmintHostedCheckoutV3Props"; | ||
| import { appendObjectToQueryParams } from "@/utils/appendObjectToQueryParams"; | ||
| import { NewTabWindow, PopupWindow } from "@crossmint/client-sdk-window"; | ||
| import type { CrossmintApiClient } from "@crossmint/common-sdk-base"; | ||
| import { crossmintHostedCheckoutOverlayService } from "./crossmintHostedCheckoutOverlayService"; | ||
|
|
||
| export type CrossmintHostedCheckoutV3ServiceProps = { | ||
| apiClient: CrossmintApiClient; | ||
| hostedCheckoutProps: CrossmintHostedCheckoutV3Props; | ||
| hostedCheckoutProps: CrossmintHostedCheckoutV3AllProps; | ||
| }; | ||
|
|
||
| export function crossmintHostedCheckoutV3Service({ | ||
|
|
@@ -15,11 +19,20 @@ export function crossmintHostedCheckoutV3Service({ | |
| }: CrossmintHostedCheckoutV3ServiceProps) { | ||
| const overlayService = crossmintHostedCheckoutOverlayService(); | ||
|
|
||
| function getUrl(props: CrossmintHostedCheckoutV3Props) { | ||
| const urlWithPath = apiClient.buildUrl("/sdk/2024-03-05/hosted-checkout"); | ||
| function getUrl(props: CrossmintHostedCheckoutV3AllProps) { | ||
| const isExistingOrder = isHostedCheckoutV3ExistingOrderProps(props); | ||
| const path = isExistingOrder | ||
| ? `/sdk/2024-03-05/hosted-checkout/${encodeURIComponent(props.orderId)}` | ||
| : "/sdk/2024-03-05/hosted-checkout"; | ||
| const urlWithPath = apiClient.buildUrl(path); | ||
| const queryParams = new URLSearchParams(); | ||
|
|
||
| appendObjectToQueryParams(queryParams, props); | ||
| if (isExistingOrder) { | ||
| const { orderId, ...restOfParams } = props as CrossmintHostedCheckoutV3OrderProps; | ||
| appendObjectToQueryParams(queryParams, restOfParams); | ||
|
Comment on lines
+31
to
+32
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. 🔴 clientSecret leaked in URL query parameters for order-based checkout When using the order-based checkout flow, the Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| } else { | ||
| appendObjectToQueryParams(queryParams, props); | ||
| } | ||
|
|
||
| queryParams.append("apiKey", apiClient.crossmint.apiKey); | ||
| queryParams.append("sdkMetadata", JSON.stringify(apiClient["internalConfig"].sdkMetadata)); | ||
|
|
||
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.
token_symbolis optional — missing fallbackAccording to the
WalletsActivityResponseUnstableDTOOpenAPI schema,token_symbolis not in therequiredarray, meaning it can be absent for some activity events (e.g. unknown or non-standard tokens). The previous code guarded this withtransfer.token.symbol ?? transfer.token.locator, but the new code renders nothing whentoken_symbolis undefined, leaving a blank next to the amount.Consider falling back to a meaningful placeholder, for example:
or a more informative fallback such as
event.token_symbol ?? event.mint_hash?.slice(0, 8) ?? "Unknown".Prompt To Fix With AI