Skip to content

feat: Experimenta pay x420#1636

Open
maxsch-xmint wants to merge 14 commits intomainfrom
experimenta_pay_x420
Open

feat: Experimenta pay x420#1636
maxsch-xmint wants to merge 14 commits intomainfrom
experimenta_pay_x420

Conversation

@maxsch-xmint
Copy link
Contributor

@maxsch-xmint maxsch-xmint commented Mar 12, 2026

Description

Add an experimental_payX402 method to our wallets SDK. Only supporting farameter so far.
Updated solana's web3 sdk, that's why there are so many package updates

Important files to review:
packages/wallets/src/wallets/wallet.ts
packages/wallets/src/x402/faremeter.ts

Test plan

Added a dashboard to easily test facilitators.

Package updates

"@crossmint/client-sdk-walletconnect": patch
"@crossmint/client-sdk-react-native-ui": patch
"@crossmint/wallets-quickstart-devkit": patch
"expo-demo": patch
"@crossmint/client-sdk-react-ui": patch
"@crossmint/auth-ssr-nextjs-demo": patch
"@crossmint/client-sdk-nextjs-starter": patch
"@crossmint/client-sdk-base": patch
"@crossmint/common-sdk-base": patch
"@crossmint/wallets-sdk": patch

Prompt To Fix All With AI
This is a comment left during a code review.
Path: packages/client/ui/react-ui/src/providers/dynamic/DynamicWalletProvider.tsx
Line: 95

Comment:
**Unsafe `as VersionedTransaction` cast after Solana web3.js update**

The Solana web3.js version bump appears to have changed the return type of `signer.signTransaction`, requiring this cast to silence the TypeScript error. However, `as VersionedTransaction` is an unchecked assertion — if the Dynamic SDK's signer still returns the older `VersionedTransaction` shape (or a `Transaction` type), the cast will succeed at compile time but downstream callers that rely on the new `VersionedTransaction` interface (e.g., methods like `serialize()`) could behave incorrectly or throw at runtime.

Before merging, please verify that the version of `@dynamic-labs/solana` in use has been updated to be compatible with the new `@solana/web3.js` version, so that `signTransaction` actually returns a compatible `VersionedTransaction`. If the Dynamic SDK hasn't been updated yet, a runtime type guard would be safer here:

```ts
const signed = await signer.signTransaction(transaction);
if (!(signed instanceof VersionedTransaction)) {
    throw new Error("Signer returned an unexpected transaction type");
}
return signed;
```

How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: da395c8

Greptile also left 1 inline comment on this PR.

@changeset-bot
Copy link

changeset-bot bot commented Mar 12, 2026

🦋 Changeset detected

Latest commit: da395c8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@crossmint/client-sdk-walletconnect Patch
@crossmint/client-sdk-react-native-ui Patch
@crossmint/wallets-quickstart-devkit Patch
expo-demo Patch
@crossmint/client-sdk-react-ui Patch
@crossmint/auth-ssr-nextjs-demo Patch
@crossmint/client-sdk-nextjs-starter Patch
@crossmint/client-sdk-base Patch
@crossmint/common-sdk-base Patch
@crossmint/wallets-sdk Patch
@crossmint/client-sdk-auth Patch
@crossmint/client-sdk-react-base Patch
@crossmint/client-sdk-verifiable-credentials Patch
@crossmint/client-sdk-smart-wallet Patch
@crossmint/common-sdk-auth Patch
@crossmint/server-sdk Patch
crossmint-auth-node Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

🔥 Smoke Test Results

Status: Passed

Statistics

  • Total Tests: 5
  • Passed: 5 ✅
  • Failed: 0
  • Skipped: 0
  • Duration: 5.64 min

✅ All smoke tests passed!

All critical flows are working correctly.


This is a non-blocking smoke test. Full regression tests run separately.

maxsch-xmint and others added 2 commits March 12, 2026 11:28
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
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.

1 participant