Skip to content

feat: add optional maxFeeMsat to pay_invoice (NIP-47 max_fee) - #737

Open
frnandu wants to merge 1 commit into
masterfrom
feat/nwc-max-fee-pay-invoice
Open

feat: add optional maxFeeMsat to pay_invoice (NIP-47 max_fee)#737
frnandu wants to merge 1 commit into
masterfrom
feat/nwc-max-fee-pay-invoice

Conversation

@frnandu

@frnandu frnandu commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Implements the max_fee parameter proposed for NIP-47 pay_invoice. Also adds the FEE_LIMIT_EXCEEDED error code.

Wallets that support the parameter will not send payments whose routing fee exceeds the budget; wallets that don't implement it ignore the parameter per spec.

nostr-protocol/nips#2444

Implements the `max_fee` parameter proposed for NIP-47 pay_invoice.
Also adds the `FEE_LIMIT_EXCEEDED` error code.

Wallets that support the parameter will not send payments whose routing
fee exceeds the budget; wallets that don't implement it ignore the
parameter per spec.
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@frnandu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ca988ec2-26df-4ef8-8002-3a841c279866

📥 Commits

Reviewing files that changed from the base of the PR and between 38e50aa and 0e016ee.

📒 Files selected for processing (3)
  • packages/ndk/lib/domain_layer/usecases/nwc/consts/error_code.dart
  • packages/ndk/lib/domain_layer/usecases/nwc/nwc.dart
  • packages/ndk/lib/domain_layer/usecases/nwc/requests/pay_invoice.dart

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.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.65%. Comparing base (5a8cf9c) to head (0e016ee).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
...omain_layer/usecases/nwc/requests/pay_invoice.dart 0.00% 6 Missing ⚠️
...ackages/ndk/lib/domain_layer/usecases/nwc/nwc.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #737      +/-   ##
==========================================
- Coverage   72.44%   71.65%   -0.80%     
==========================================
  Files         227      227              
  Lines       13338    13341       +3     
==========================================
- Hits         9663     9559     -104     
- Misses       3675     3782     +107     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frnandu frnandu added this to the 0.10.0 milestone Aug 27, 2026
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