Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Full New Ramp Plugin Rearchitecture #5740

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

Merged
samholmes merged 20 commits into develop from sam/ramp-plugin-full
Sep 12, 2025
Merged

Full New Ramp Plugin Rearchitecture #5740

samholmes merged 20 commits into develop from sam/ramp-plugin-full
Sep 12, 2025

Conversation

@samholmes
Copy link
Contributor

@samholmes samholmes commented Sep 11, 2025
edited by Jon-edge
Loading

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@samholmes samholmes changed the title (削除) Sam/ramp plugin full (削除ここまで) (追記) Full New Ramp Plugin Rearchitecture (追記ここまで) Sep 11, 2025
Copy link
Collaborator

@Jon-edge Jon-edge left a comment

Choose a reason for hiding this comment

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

Ramp Plugin Combined Branch Review

This report reviews the combined branch against comments from the following PRs, and notes any new issues discovered:

PR #5697: Sam/all ramp plugins

  • Make Moonpay base URL a constant: comment
    • Status: Addressed in current branch (uses initOptions.apiUrl and builds .../v3/... paths)
    • File: src/plugins/ramps/moonpay/moonpayRampPlugin.ts (see fetches and quote URLs)
  • Allow swapping Moonpay URLs via init options: comment
    • Status: Addressed in current branch (apiUrl, buyWidgetUrl, sellWidgetUrl present in initOptions)
    • File: src/plugins/ramps/moonpay/moonpayRampPlugin.ts (lines near initOptions parse)
  • Use correct token lookup (avoid wallet-only lookups): comment
    • Status: Not addressed in current branch — Moonpay still passes the ramp plugin id instead of the currency plugin id to findTokenIdByNetworkLocation
    • File: src/plugins/ramps/moonpay/moonpayRampPlugin.ts around token resolution (uses pluginId instead of currencyPluginId when calling findTokenIdByNetworkLocation)
  • Ensure fetchQuote throws proper FiatProviderError (min/max etc): multiple comments
    • Status: Addressed in current branch (Moonpay, Bity, Paybis all throw typed errors for region/asset/payment/limits)
    • Files: moonpayRampPlugin.ts, bityRampPlugin.ts, paybisRampPlugin.ts
  • Navigation may be null (crash risk) across plugins & scenes: multiple comments
    • Status: Addressed per reviewer decision — navigation is now required in RampPluginConfig and provided via useRampPlugins (no additional guards required)
    • Files: src/plugins/ramps/rampPluginTypes.ts, src/hooks/useRampPlugins.ts
    • Caveat: If an approval flow continues after the originating scene unmounts, a subsequent navigation.pop() may no-op. This does not crash, but if desired we can centralize navigation calls behind a small helper that checks focus before popping.
  • Logging noise reductions
    • Status: Addressed per reviewer decision

PR #5700: Max button ramp plugins

  • Flag icon broken image when URI empty: comment
    • Status: Addressed in current branch (falls back to FiatIcon when flag URL missing)
    • File: src/components/scenes/TradeCreateScene.tsx (selected fiat flag handling)
  • Caching/shared cache suggestion and related follow-ups
    • Status: Addressed per thread decision (dropped caching for ramp plugins)
  • Style-only suggestions (variable names, one-decl-per-line)
    • Status: Not addressed (non-functional)

PR #5701: Sam/amount type filtering

  • Prevent unsupported amountType requests when plugin support changes: comment
    • Status: Addressed in current branch (do not construct rampQuoteRequest if selected amount type is disabled)
    • File: src/components/scenes/TradeCreateScene.tsx (guard in useMemo for rampQuoteRequest)
  • Optional auto-switch of lastUsedInput when disabled
    • Status: Addressed via guard approach (no auto-switch, but invalid request is prevented)

What still needs action (not addressed by this branch)

  • Moonpay token resolution bug: pass the currency plugin id to findTokenIdByNetworkLocation instead of the ramp pluginId.
    • File: src/plugins/ramps/moonpay/moonpayRampPlugin.ts near the currency loop where currencyPluginId is derived; ensure that value is used in the lookup.
  • Optional: Style-only cleanups from PR #5700 (variable naming / one-decl-per-line) if desired.

This is an attempt to get the agent to automatically document lessons
learned to the docs/ directory. This way conventions are maintained and
over time as the agent is course corrected.
- Create docs/localization-guidelines.md with mandatory UI string localization rules
- Create docs/component-styling-guidelines.md with styled HOC usage patterns
- Update AGENTS.md with Documentation section indexing all docs/ files
- Add rule requiring all docs/ markdown files to be indexed in AGENTS.md
- Add localized strings for TradeRegionSelectScene to en_US.ts
This file contains run configuration such as RN_SIMULATOR and RN_PORT
to be used by a rn-ios script. This is for development purposes
This is a consistent card design for the new fiat buy UI.
- Implement TradeCreateScene and TradeOptionSelectScene for buy/sell flow
- Add Paybis as first ramp plugin with full API integration
- Create reusable hooks for ramp plugin management (useRampPlugins, useRampQuotes)
- Add payment type icon system with comprehensive mappings
- Implement quote fetching and comparison across multiple providers
- Add best rate badge component for quote comparison
- Create ramp plugin type definitions and store utilities
- Add comprehensive documentation for migration and architecture
- Include unit tests for payment types and store IDs
- Update navigation and deeplink handlers for ramp flows
BREAKING CHANGE: Replaces legacy FiatPluginUi with new ramp plugin system
Include plugin IDs in React Query key so quotes refetch when
region/currency/wallet changes affect available plugins. Simplify
queryFn to always check current plugins while reusing valid cached
quotes.
The warning from reannimated library is aweful and implores us to not
access `.value` on a SharedValue from within the component render
function.
@samholmes samholmes merged commit 366f117 into develop Sep 12, 2025
3 checks passed
@samholmes samholmes deleted the sam/ramp-plugin-full branch September 12, 2025 17:09
Jon-edge added a commit that referenced this pull request Sep 19, 2025
samholmes added a commit that referenced this pull request Sep 24, 2025
samholmes added a commit that referenced this pull request Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Jon-edge Jon-edge Jon-edge approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /