Skip to content

Conversation

@ca333
Copy link
Contributor

@ca333 ca333 commented Oct 29, 2025

update params ref. breaking changes

Summary by CodeRabbit

  • New Features
    • Enhanced KMD coin withdrawal functionality with improved parameter management for rewards validation and processing.

@ca333 ca333 merged commit 26d1889 into main Oct 29, 2025
4 of 12 checks passed
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes introduce a new RpcExtras utility class to encapsulate coin-specific RPC parameters for withdrawal operations. The class provides a withdrawForCoin method that returns KMD-specific rewards configuration, while other coins receive empty parameter maps. The WithdrawRequest is updated to integrate these extras into its JSON serialization.

Changes

Cohort / File(s) Change Summary
New RPC Extras Utility
lib/mm2/mm2_api/rpc/rpc_extras.dart
New utility class RpcExtras with constant kDefaultKmdRewardsAmount and static method withdrawForCoin that returns coin-specific RPC parameters—KMD returns kmd_rewards configuration, other coins return empty map
Withdraw Request Integration
lib/mm2/mm2_api/rpc/withdraw/withdraw_request.dart
Added import of RpcExtras, integrated withdrawForCoin call to retrieve coin-specific extras, and updated toJson to merge extras into top-level JSON map

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Well-scoped changes with clear intent and minimal surface area
  • New utility class contains straightforward logic with a single conditional branch for coin type handling
  • Integration point in withdraw request is a simple, consistent pattern application
  • No complex logic density or structural concerns

Poem

🐰 With coins and extras, neat and tidy,
KMD rewards flow on Friday,
RpcExtras hops with graceful care,
Withdrawal magic everywhere! ✨

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 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 f11546a and 8c34ba1.

📒 Files selected for processing (2)
  • lib/mm2/mm2_api/rpc/rpc_extras.dart (1 hunks)
  • lib/mm2/mm2_api/rpc/withdraw/withdraw_request.dart (3 hunks)

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

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

https://walletrc--pull-3289-merge-aw47txlv.web.app

(expires Wed, 05 Nov 2025 06:03:13 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

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.

2 participants