Skip to content

hot-fix(fiat-onramp): breaking Ramp API change#2794

Merged
ca333 merged 2 commits intomainfrom
hotfix/ramp-api-change
Jun 19, 2025
Merged

hot-fix(fiat-onramp): breaking Ramp API change#2794
ca333 merged 2 commits intomainfrom
hotfix/ramp-api-change

Conversation

@takenagain
Copy link
Copy Markdown
Contributor

@takenagain takenagain commented Jun 18, 2025

Aligns the Ramp enabledFlows configuration parameter with the format expected and defined in their documentation.

Although incorrect, the Ramp v1 API previously accepted (or ignored) the URL encoded string of a JavaScript array ['ONRAMP'] -> %5B%27ONRAMP%27%5D. A recent change to their form/API appears to have tightened up their validation, and the URL-encoded array is no longer accepted.

Ramp was last tested between 07-15 May 2025 (#2608 , #2570), so this change likely occurred sometime afterwards. I couldn't locate changelogs, or PRs in their repositories documenting releases or major changes.

Note:

  • They have also recently updated their excluded countries list, and I can no longer make payments or proceed with KYC.
  • Their new form does not play well with ad-blockers when entering a new email (new account without KYC completed).

Summary by CodeRabbit

  • Bug Fixes

    • Corrected the format of the payment flow parameter when initiating a fiat-to-crypto purchase, ensuring smoother transaction processing.
  • Chores

    • Updated the app version number.

undocumented change to the v1 API `enabledFlows` configuration option
@takenagain takenagain self-assigned this Jun 18, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 18, 2025

Walkthrough

The changes update the value of the 'enabledFlows' key in a payload within the RampFiatProvider class, altering it from a bracketed string to a plain string. Additionally, the project version in pubspec.yaml is incremented from 0.9.1+0 to 0.9.1+1. No other logic or configuration is modified.

Changes

File(s) Change Summary
lib/bloc/fiat/ramp/ramp_fiat_provider.dart Changed 'enabledFlows' value in payload from '[ONRAMP]' to 'ONRAMP'
pubspec.yaml Incremented version: 0.9.1+0 → 0.9.1+1

Poem

A bracket dropped, the flow set free,
"ONRAMP" stands alone for all to see.
A version bumped, a tidy sweep,
Into the code, these changes creep.
Hop, hop, hooray—release is near,
The rabbit grins from ear to ear!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85335af and 4311841.

📒 Files selected for processing (2)
  • lib/bloc/fiat/ramp/ramp_fiat_provider.dart (1 hunks)
  • pubspec.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: Build Mobile (iOS)
  • GitHub Check: Build Mobile (Android)
  • GitHub Check: Test web-app-linux-profile
  • GitHub Check: Test web-app-macos
  • GitHub Check: build_and_preview
  • GitHub Check: validate_code_guidelines
  • GitHub Check: unit_tests
  • GitHub Check: Build Desktop (linux)
  • GitHub Check: Build Desktop (macos)
  • GitHub Check: Build Desktop (windows)
🔇 Additional comments (2)
pubspec.yaml (1)

18-18: Version bump looks appropriate for this bug fix.

The build number increment from 0.9.1+0 to 0.9.1+1 correctly reflects this as a patch-level fix without API changes.

lib/bloc/fiat/ramp/ramp_fiat_provider.dart (1)

312-312: Correctly fixes the Ramp API breaking change.

The change from '[ONRAMP]' to 'ONRAMP' removes the JavaScript array brackets that were incorrectly formatted as a string. This aligns with the PR description and addresses the API validation tightening mentioned in the objectives.

Let me verify there are no other instances of the old format in the codebase:

#!/bin/bash
# Description: Search for any other instances of the old '[ONRAMP]' format or similar patterns
# Expected: Should only find references in comments, documentation, or this fix

echo "Searching for old format '[ONRAMP]' pattern..."
rg -i '\[.?ONRAMP.?\]' --type dart

echo -e "\nSearching for 'enabledFlows' usage..."
rg -i 'enabledFlows' --type dart -A 2 -B 2

echo -e "\nSearching for similar bracket patterns in Ramp-related code..."
rg -i "ramp" --type dart -A 5 -B 5 | rg '\[.*\]'

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@takenagain takenagain changed the base branch from main to dev June 18, 2025 00:09
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 18, 2025

Visit the preview URL for this PR (updated for commit 4311841):

https://walletrc--pull-2794-merge-ynm0pfkx.web.app

(expires Thu, 26 Jun 2025 15:17:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@takenagain takenagain marked this pull request as ready for review June 18, 2025 02:01
@takenagain takenagain added the bug Something isn't working label Jun 18, 2025
@takenagain takenagain linked an issue Jun 18, 2025 that may be closed by this pull request
@takenagain takenagain requested review from CharlVS and smk762 June 18, 2025 02:02
@CharlVS CharlVS changed the base branch from dev to main June 19, 2025 14:42
@CharlVS CharlVS changed the title fix(fiat-onramp): breaking Ramp API change hot-fix(fiat-onramp): breaking Ramp API change Jun 19, 2025
@CharlVS CharlVS requested review from DeckerSU and ca333 June 19, 2025 15:14
@ca333 ca333 merged commit 9798b99 into main Jun 19, 2025
9 of 13 checks passed
@CharlVS CharlVS deleted the hotfix/ramp-api-change branch June 20, 2025 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integration issue with Ramp, buy modal is blank

3 participants