Skip to content

Conversation

@takenagain
Copy link
Collaborator

@takenagain takenagain commented Jul 29, 2025

Summary by CodeRabbit

  • Chores
    • Temporarily disabled "Card Payment" and "Apple Pay" options with the Ramp provider due to unavailable API keys.
    • Removed Ramp as a fiat provider from the list of available options. Ramp-related options will be re-enabled once API keys are available.

@takenagain takenagain self-assigned this Jul 29, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 29, 2025

Walkthrough

The changes temporarily disable the Ramp fiat provider and its associated payment methods in the application due to unavailable API keys. This is achieved by commenting out relevant code sections and adding explanatory comments and TODOs for re-enabling once the keys are available. No other logic or functionality is modified.

Changes

Cohort / File(s) Change Summary
Disable Ramp Payment Methods
lib/bloc/fiat/models/fiat_payment_method.dart
Commented out "Card Payment" and "Apple Pay" methods for Ramp in defaultFiatPaymentMethods, with explanatory comments and a TODO.
Remove Ramp Provider from FiatRepository
lib/views/fiat/fiat_page.dart
Commented out initialization of RampFiatProvider in the providers list for FiatRepository, leaving only BanxaFiatProvider. Added comments explaining the change and a TODO.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • smk762
  • DeckerSU
  • CharlVS
  • ca333

Poem

The Ramp is closed, the keys astray,
So Banxa takes the lead today.
Card and Apple Pay on hold,
Awaiting keys, both brave and bold.
A TODO whispers, “Not for long—
We’ll hop back in when keys are strong!” 🐰🔑

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/temporarily-disable-ramp

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 generate unit tests to generate unit tests for 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
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 29, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
lib/bloc/fiat/models/fiat_payment_method.dart (1)

123-145: Avoid leaving disabled code in-place – prefer a feature flag / build-time toggle

Keeping >20 lines of commented-out code bloats the file and makes it harder to see real logic. Consider:

  1. Introduce a simple runtime flag (kIsRampEnabled) that controls whether the two FiatPaymentMethod entries are added.
  2. Or move the Ramp methods to a separate file and exclude that file from the build via dart define / flavour specific imports.

This keeps the main model tidy and prevents stale code from creeping in.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 78b091b and f1060e8.

📒 Files selected for processing (2)
  • lib/bloc/fiat/models/fiat_payment_method.dart (1 hunks)
  • lib/views/fiat/fiat_page.dart (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
lib/views/fiat/fiat_page.dart (2)

Learnt from: takenagain
PR: #2566
File: lib/bloc/coins_bloc/coins_bloc.dart:10-10
Timestamp: 2025-04-01T15:51:37.060Z
Learning: The excludedAssetList from app_config.dart is used in the _filterExcludedAssets method in coins_state.dart. Since coins_state.dart is a part file of coins_bloc.dart, the import needs to be in the parent file even though it's not directly used there. In Dart, part files share the namespace and imports of their parent files.

Learnt from: takenagain
PR: #2566
File: lib/bloc/coins_bloc/coins_bloc.dart:10-10
Timestamp: 2025-04-01T15:51:37.060Z
Learning: In the Komodo Wallet project, part files share imports with their parent files. The import for app_config.dart in coins_bloc.dart is necessary because the part file coins_state.dart uses excludedAssetList from that package.

lib/bloc/fiat/models/fiat_payment_method.dart (2)

Learnt from: takenagain
PR: #2566
File: lib/bloc/coins_bloc/coins_bloc.dart:10-10
Timestamp: 2025-04-01T15:51:37.060Z
Learning: The excludedAssetList from app_config.dart is used in the _filterExcludedAssets method in coins_state.dart. Since coins_state.dart is a part file of coins_bloc.dart, the import needs to be in the parent file even though it's not directly used there. In Dart, part files share the namespace and imports of their parent files.

Learnt from: takenagain
PR: #2566
File: lib/bloc/coins_bloc/coins_bloc.dart:10-10
Timestamp: 2025-04-01T15:51:37.060Z
Learning: In the Komodo Wallet project, part files share imports with their parent files. The import for app_config.dart in coins_bloc.dart is necessary because the part file coins_state.dart uses excludedAssetList from that package.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: build_and_preview
  • GitHub Check: Build Mobile (iOS)
  • GitHub Check: Build Mobile (Android)
  • GitHub Check: validate_code_guidelines
  • GitHub Check: Build Desktop (macos)
  • GitHub Check: Build Desktop (linux)
  • GitHub Check: Test web-app-macos
  • GitHub Check: Test web-app-linux-profile
  • GitHub Check: unit_tests
  • GitHub Check: Build Desktop (windows)

Comment on lines +51 to 55
// Ramp API keys unavailable for the time being
// TODO(takenagain): re-enable when API keys are available
// [BanxaFiatProvider(), RampFiatProvider()],
[BanxaFiatProvider()],
coinsRepository,
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

ramp_fiat_provider.dart import is now unused – will fail on dart analyze --fatal-warnings

Since the provider list no longer contains RampFiatProvider, the import at line 11 becomes unused.
Either:

-import 'package:web_dex/bloc/fiat/ramp/ramp_fiat_provider.dart';
+// import removed while Ramp is disabled – add back when keys are refreshed

or add the provider conditionally behind a compile-time flag so the import remains referenced when enabled.

Neglecting this will cause CI to break if unused-import warnings are treated as errors.

🤖 Prompt for AI Agents
In lib/views/fiat/fiat_page.dart around lines 51 to 55, the import for
ramp_fiat_provider.dart is now unused because RampFiatProvider is commented out
from the provider list. To fix this, either remove the import statement for
ramp_fiat_provider.dart at line 11 or reintroduce RampFiatProvider conditionally
using a compile-time flag so the import remains referenced when enabled. This
will prevent dart analyze from failing due to unused imports.

@github-actions
Copy link

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

https://walletrc--pull-3015-merge-asg4ovmu.web.app

(expires Tue, 05 Aug 2025 00:07:25 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@takenagain takenagain marked this pull request as ready for review July 29, 2025 11:21
Copilot AI review requested due to automatic review settings July 29, 2025 11:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR temporarily disables Ramp fiat provider functionality due to unavailable API keys. The changes comment out Ramp-related payment methods and remove the Ramp provider from the active provider list until API keys can be refreshed.

  • Removed RampFiatProvider from the active fiat providers list
  • Commented out Ramp payment methods (Card Payment and Apple Pay)
  • Added TODO comments for re-enabling once API keys are available

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/views/fiat/fiat_page.dart Removes RampFiatProvider from the FiatRepository initialization
lib/bloc/fiat/models/fiat_payment_method.dart Comments out Ramp-specific payment methods (Card Payment and Apple Pay)

@takenagain takenagain changed the title chore(fiat-onramp): temporarily disable Ramp until API keys are refreshed chore(fiat-onramp): temporarily disable Ramp until API keys are regenerated Jul 29, 2025
@takenagain takenagain requested a review from CharlVS July 29, 2025 12:26
Copy link
Collaborator

@CharlVS CharlVS left a comment

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Since the RampFiatProvider() is disabled, are the changes to lib/bloc/fiat/models/fiat_payment_method.dart still necessary? I haven't looked at the full context yet, but I assume the available options are populated dynamically based on the registered providers.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The defaultFiatPaymentMethods is a placeholder value used when

  • there is no valid Fiat amount entered (initial form state), and
  • when logging out and resetting the form (before updating providers with a default example fiat value of 10000).

@CharlVS CharlVS merged commit a8f784f into dev Jul 29, 2025
7 of 13 checks passed
@takenagain takenagain deleted the chore/temporarily-disable-ramp branch July 31, 2025 09:10
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.

3 participants