Skip to content
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

Add authorization in rippleMPTCredit #7

Merged

Conversation

shawnxie999
Copy link

High Level Overview of Change

Context of Change

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@shawnxie999 shawnxie999 marked this pull request as ready for review January 5, 2024 20:31
@shawnxie999 shawnxie999 marked this pull request as draft January 5, 2024 20:35
@shawnxie999 shawnxie999 marked this pull request as ready for review January 5, 2024 20:36
@@ -1718,6 +1718,14 @@ rippleMPTCredit(
STAmount saAmount,
beast::Journal j)
{
if (auto const ter = requireAuth(view, saAmount.issue(), uSenderID);
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure if this check should be done here. If we draw a parallel with rippleCredit then the check doesn't belong here. How about we do the check in the Payment transactor right before the call to rippleMPTCredit? I think that once we add DEX integration, the direct payment is going to be moved to the MPTEndpointStep (similar to XRPEndpointStep) and the authorization check will be done in the step.

@gregtatcam gregtatcam merged commit 5f5182f into gregtatcam:cftoken-direct-pay Jan 8, 2024
3 of 8 checks passed
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