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

SDFSOF-64 - Added handlers for notify_onchain_funds_received, notify_refund_initiated and notify_refund_sent. #972

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

MazurakIhor
Copy link
Contributor

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with name of package that is most changed in the PR, ex.
    paymentservice.stellar, or all or doc if the changes are broad or impact many
    packages.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.

What

Added handlers for notify_onchain_funds_received, notify_refund_initiated and notify_refund_sent

Why

Those handlers handle status transfer and update corresponding data in the database

Known limitations

[TODO or N/A]

@MazurakIhor MazurakIhor requested a review from rkharevych July 5, 2023 08:49
@stellar-jenkins
Copy link

Reference Server Preview is available here:
https://anchor-ref-pr972.previews.kube001.services.stellar-ops.com/
SEP Server Preview is available here:
https://anchor-sep-pr972.previews.kube001.services.stellar-ops.com/

return null;
})
.filter(Objects::nonNull)
.sorted(Comparator.comparing(ObservedPayment::getCreatedAt))
Copy link
Contributor

Choose a reason for hiding this comment

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

use static import

? StellarPayment.Type.PAYMENT
: StellarPayment.Type.PATH_PAYMENT)
.build())
.collect(Collectors.toList()))
Copy link
Contributor

Choose a reason for hiding this comment

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

use static import

}

validateAsset("amount_in", request.getAmountIn());
Copy link
Contributor

Choose a reason for hiding this comment

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

You can create AmountRequest object and use amountInAsset from txn

@stellar-jenkins
Copy link

Reference Server Preview is available here:
https://anchor-ref-pr972.previews.kube001.services.stellar-ops.com/
SEP Server Preview is available here:
https://anchor-sep-pr972.previews.kube001.services.stellar-ops.com/

@MazurakIhor MazurakIhor merged commit 5c5cc4e into SDFSOF-64 Jul 5, 2023
@MazurakIhor MazurakIhor deleted the feature/SDFSOF-64_refund branch July 5, 2023 11:36
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