Skip to content

chore(sample): update the Kotlin sample to Grid SDK 2.0.0 - #1136

Merged
pengying merged 1 commit into
mainfrom
peng/kotlin-sample-sdk-2
Oct 7, 2026
Merged

pengying merged 1 commit into
mainfrom
peng/kotlin-sample-sdk-2

Conversation

@pengying

@pengying pengying commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Updates samples/kotlin from Grid Kotlin SDK 1.7.1 to 2.0.0, which is now on Maven Central. The routes change only where the SDK's types changed:

  • Quotes: source and destination variants use the 2.0.0 names, such as QuoteSourceOneOf.ofAccount instead of ofAccountQuoteSource. QuoteCreateParams keeps its 1.7.1 setters.
  • Customers: the request is an IndividualCustomerCreateRequest, passed directly to createCustomerRequest.
  • External accounts: accountInfo, currency, and customerId are set on ExternalAccountCreateParams directly. The ExternalAccountCreate wrapper is gone, and ofEthereumWalletExternal is now ofEthereumWallet. The INR route no longer sets bankName, which InrExternalAccountCreateInfo dropped.
  • Sandbox: fund and send-funds requests pass a FundRequest and a SendRequest body.
  • Auth credentials: passkey create and verify use PasskeyAttestation and PasskeyAssertion, and resendChallenge is now challenge.

The end-to-end test now gives each customer an email, which the API requires when creating a customer.

Tests

  • Compiles against lightspark-grid-kotlin:2.0.0 resolved from Maven Central, with no local Maven repository.
  • ./gradlew test: all 8 end-to-end tests pass against the dev sandbox.

🤖 Generated with Claude Code

Bump lightspark-grid-kotlin from 1.7.1 to 2.0.0 and update the routes
for its API:

- Customers: wrap the request in IndividualCustomerCreateRequest and
  pass it as createCustomerRequest.
- External accounts: set accountInfo, currency, and customerId on
  ExternalAccountCreateParams directly, and use the typed account info
  union (ofEthereumWallet replaces ofEthereumWalletExternal).
- Quotes: build sources and destinations with the 2.0.0 variant names
  (ofAccount, ofRealtimeFunding, ofUmaAddress).
- Sandbox: pass FundRequest and SendRequest bodies.
- Auth credentials: build passkey requests with their typed builders and
  pass the challenge and verify bodies as typed requests.

The end-to-end test now gives every customer an email, which customer
creation requires.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
grid-cards-demo Ignored Ignored Preview Oct 7, 2026 6:11pm UTC
grid-flow-builder Ignored Ignored Preview Oct 7, 2026 6:11pm UTC
grid-wallet-demo Ignored Ignored Preview Oct 7, 2026 6:11pm UTC

Request Review

@pengying
pengying marked this pull request as ready for review October 7, 2026 18:11

pengying commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[Medium risk] Updates Kotlin sample code to a new SDK major version.

The PR appears safe to merge, with a non-blocking request to test the changed passkey calls.

Findings

  1. P2 Passkey changes lack tests ▶
Fix with agent prompt
### Issue 1
samples/kotlin/src/main/kotlin/com/grid/sample/routes/AuthCredentials.kt:247
The SDK migration changes passkey creation, challenge, and verification, but none of the eight end-to-end tests call these routes. Verification now passes `PasskeyAssertion` directly where the old code built a request containing `type` and `assertion`.

Add tests that check the outgoing JSON for all three calls, including a challenge without `clientPublicKey`. Compilation and the payout tests cannot catch an incorrect credential request body.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Updates the Kotlin sample to Grid SDK 2.0.0 and adapts customer, account, quote, sandbox, and credential calls to its new types.

  • Adds email addresses to customer test requests.
  • Adds no tests for the changed credential request bodies; targeted coverage would help protect passkey flows.

Reviews (1) · Last reviewed commit: "chore(sample): update the Kotlin sample ..." · Reviewed by Greptile

.id(authMethodId)
.requestId(requestId)
.authCredentialVerifyRequest(verifyRequest)
.passkeyAuthCredentialVerifyRequest(assertion)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Passkey changes lack tests

The SDK migration changes passkey creation, challenge, and verification, but none of the eight end-to-end tests call these routes. Verification now passes PasskeyAssertion directly where the old code built a request containing type and assertion.

Add tests that check the outgoing JSON for all three calls, including a challenge without clientPublicKey. Compilation and the payout tests cannot catch an incorrect credential request body.

Prompt To Fix With AI
This is a comment left during a code review.
Path: samples/kotlin/src/main/kotlin/com/grid/sample/routes/AuthCredentials.kt
Line: 247

Comment:
**Passkey changes lack tests**

The SDK migration changes passkey creation, challenge, and verification, but none of the eight end-to-end tests call these routes. Verification now passes `PasskeyAssertion` directly where the old code built a request containing `type` and `assertion`.

Add tests that check the outgoing JSON for all three calls, including a challenge without `clientPublicKey`. Compilation and the payout tests cannot catch an incorrect credential request body.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@pengying
pengying merged commit c68e48b into main Oct 7, 2026
8 checks passed
@pengying
pengying deleted the peng/kotlin-sample-sdk-2 branch October 7, 2026 18:44
pengying added a commit that referenced this pull request Oct 8, 2026
## What changed

Adds two entries to the October 2026 update in `mintlify/changelog.mdx`. The window is 2026-09-30 to 2026-10-07. Everything else that shipped in the window was already in the changelog (`expiresAt`, `UmaAddressDestination.currency`, `200` for quote and transfer creation, `railDetails`, `5xx` for counterparty failures).

## Entries and sources

| Entry | grid-api | webdev | Other |
|---|---|---|---|
| List balance changes for periodic statements | #1079 | webdev#36304, #36463, #36963, #36978 (all merged) | No #shipped post, no Jira key found |
| Business customers can omit `taxId` and `incorporatedOn` | #1127 | webdev#36765, #37075 (merged) | No #shipped post. AT-5709 (tax ID validation) is related but not cited |

Field names, status codes, and behavior were checked against `openapi/paths/internal_accounts/internal_accounts_{id}_balance-changes.yaml`, `BalanceChange.yaml`, and `BusinessInfo.yaml`.

## Needs confirmation

- `POST /internal-accounts/{id}/confirm-statement` (#1079): the spec is merged and webdev#36051 (merged 2026-09-25) added delivery confirmation. webdev#36305, "statement receipts", is still open. Left out until someone confirms the endpoint is live.
- Payment documents (`POST /payment-documents`, `documentIds` on `POST /quotes`, #1070): upload shipped in webdev#36138 (merged 2026-10-06), but webdev#36214, which attaches documents in `POST /quotes`, is open and gated per platform by `CHINA_B2B_DOCUMENT_UPLOAD`. Left out as unreleased.
- Whether the `taxId` and `incorporatedOn` change is live for all platforms. Both sources are merged, but no #shipped post confirms it.

## Deliberately excluded

- Restored ARS and Bitcoin L1 payment instructions (#1120, #1118) and the PaymentInstructions schema consolidation (#1109): restores of existing schemas and refactors.
- Verified contact change models (#3c9de22 / #1102): embedded wallet models, not confirmed customer-visible.
- `DUPLICATE_EXTERNAL_ACCOUNT` 409 docs (#1111) and OTP signing docs (#1110): docs-only clarifications.
- Account schema syncs (#1103, #1119), the EUR BIC example fix (#917), and the Kotlin sample update (#1136): chores and samples.
- Jira AT-6636 to AT-6638, AT-6726, AT-6730, AT-6731, AT-6732, AT-6741, AT-6742: internal JIT liquidity, bulk settlement, and FBO routing work with no API surface in the spec.
- #shipped had no Grid API posts in the window (infra and tooling posts only).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01VKjZAXb9k5QM8j2WSpMB2i

---
_Generated by [Claude Code](https://claude.ai/code/session_01VKjZAXb9k5QM8j2WSpMB2i)_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants