Skip to content

feat(ramps): migrate onramp/offramp examples to Dynamic JS SDK#52

Draft
avneesh0612 wants to merge 1 commit into
dynamic-labs-oss:mainfrom
avneesh0612:worktree-agent-a09c2932b3a889af7
Draft

feat(ramps): migrate onramp/offramp examples to Dynamic JS SDK#52
avneesh0612 wants to merge 1 commit into
dynamic-labs-oss:mainfrom
avneesh0612:worktree-agent-a09c2932b3a889af7

Conversation

@avneesh0612
Copy link
Copy Markdown
Contributor

Summary

  • Converts nextjs-iron-ramp from React SDK to JS SDK 0.24.1 — removes all @dynamic-labs/sdk-react-core and @dynamic-labs/ethereum dependencies, adds @dynamic-labs-sdk/client + @dynamic-labs-sdk/evm, builds WalletContext with getWalletAccounts/onEvent, rewrites custom DynamicButton with email OTP + Google OAuth + EVM wallet connect
  • Upgrades nextjs-moneygram-ramp from JS SDK 0.12.1 to 0.24.1 — replaces addWaasEvmExtension/addWaasSolanaExtension + autoInitialize: false + initializeClient pattern with simpler addEvmExtension()/addSolanaExtension() auto-initialize pattern, adds multi-chain WalletContext (EVM + Solana)
  • Applies standard visual theme to both apps: Roboto font, rgb(249,249,249) background, #4779FF primary, sticky white header with Dynamic logo, footer with "Powered by Dynamic" link, #DADADA borders

Test plan

  • Verify auth flow (email OTP, Google OAuth) in each app
  • Verify ramp operations still work after SDK migration
  • Verify standard theme applied consistently across header, footer, and components
  • Verify EVM wallet signing in iron ramp (proof-of-ownership message for Iron registration)
  • Verify multi-chain wallet accounts (EVM + Solana) in moneygram ramp

🤖 Generated with Claude Code

- Converts nextjs-iron-ramp from React SDK to JS SDK 0.24.1 with EVM extension, WalletContext, custom DynamicButton, and standard Roboto/light theme
- Upgrades nextjs-moneygram-ramp from JS SDK 0.12.1 to 0.24.1 using simpler addEvmExtension/addSolanaExtension pattern, adds standard theme, header, footer, and custom DynamicButton with multi-chain support

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
avneesh0612 added a commit that referenced this pull request May 13, 2026
Strip out ramps (iron-ramp, moneygram-ramp), yield (morpho, aave, pods)
files — those belong in their own PRs (#49 yield, #52 ramps).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@avneesh0612 avneesh0612 marked this pull request as draft May 13, 2026 22:32
avneesh0612 added a commit that referenced this pull request May 21, 2026
* feat(swaps): migrate mayan and lifi examples to JS SDK

Converts nextjs-bridge-mayan and nextjs-bridge-swaps-lifi from the
React SDK (@dynamic-labs/*) to the JS SDK (@dynamic-labs-sdk/*),
applying the standard visual theme and custom DynamicButton auth flow.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* feat(yield): migrate aave, morpho, pods examples to JS SDK

Converts nextjs-stablecoin-yield-aave, nextjs-defi-lending-morpho, and
nextjs-stablecoin-yield-pods from React SDK (@dynamic-labs/sdk-react-core,
@dynamic-labs/wagmi-connector) to the JS SDK (@dynamic-labs-sdk/client ^0.24.1
+ @dynamic-labs-sdk/evm ^0.24.1).

- Removes DynamicContextProvider, DynamicWagmiConnector, WagmiProvider,
  ThemeProvider and all wagmi hooks (useAccount, useChainId, useWriteContract,
  useSwitchChain, useReadContract, useReadContracts)
- Adds createDynamicClient + addEvmExtension pattern in src/lib/dynamic.ts
- Adds custom WalletContext with useWallet() hook in src/lib/providers.tsx
- Replaces wagmi contract hooks with direct viem publicClient reads and
  createWalletClientForWalletAccount for writes
- Applies standard visual theme (Roboto font, #4779FF palette, custom
  DynamicButton with Google/Email/Wallet auth flows)
- Removes theme-provider.tsx, mode-toggle.tsx, hamburger-menu.tsx, wagmi.ts

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* feat(ramps): migrate iron and moneygram examples to JS SDK

- Converts nextjs-iron-ramp from React SDK to JS SDK 0.24.1 with EVM extension, WalletContext, custom DynamicButton, and standard Roboto/light theme
- Upgrades nextjs-moneygram-ramp from JS SDK 0.12.1 to 0.24.1 using simpler addEvmExtension/addSolanaExtension pattern, adds standard theme, header, footer, and custom DynamicButton with multi-chain support

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* fix(swaps): revert lifi to wagmi/react-sdk, fix mayan layout and chain filtering

LiFi:
- Revert provider stack to wagmi + @dynamic-labs/sdk-react-core (execution was
  unreliable with the JS SDK / custom viem transport approach)
- Keep all new UI components (ExecutionDisplay loading state, footer fix, etc.)
- Restore useSyncWagmiConfig, DynamicContextProvider, WagmiProvider
- Fix SSR window error in dynamic.ts with typeof window guard

Mayan:
- Move nav/footer into layout.tsx for reliable sticky-footer behavior
- Restrict FROM chain selector to EVM_CHAINS only (non-EVM source chains
  can't be signed by the EVM embedded wallet)
- Fix SSR window error in dynamic.ts

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(swaps): remove non-swaps files from branch

Strip out ramps (iron-ramp, moneygram-ramp), yield (morpho, aave, pods)
files — those belong in their own PRs (#49 yield, #52 ramps).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

* chore(swaps): remove remaining stray files from non-swaps examples

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.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