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

feat(mojaloop/project#2553): send extra notification back to payee when a transfer is aborted #872

Closed

Conversation

lewisdaly
Copy link
Contributor

No description provided.

Copy link
Member

@mdebarros mdebarros left a comment

Choose a reason for hiding this comment

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

Hey @lewisdaly, this PR is looking good.

No major issues from what I can see, but I do have a "sanity" check that you should consider.

const eventDetail = { functionality: TransferEventType.NOTIFICATION, action: TransferEventAction.RESERVED_ABORTED }
const reservedAbortedPayload = {
transferId: transferAborted.id,
completedTimestamp: Util.Time.getUTCString(new Date(transferAborted.completedTimestamp)),
Copy link
Member

Choose a reason for hiding this comment

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

A good sanity check here is to see what the PayeeFSP would receive when doing a GET /transfers/{ID} request (after the transfer was aborted of course).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah good point - I think I exercise this in the integration tests though - by doing a lookup on the database and ensuring the completed timestamp is the same... let me double check

Copy link
Member

@mdebarros mdebarros left a comment

Choose a reason for hiding this comment

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

Minor comments for review.

@@ -381,22 +381,21 @@ const fulfil = async (error, messages) => {
const eventDetail = { functionality, action }
if (action !== TransferEventAction.RESERVE) {
if (!isTransferError) {
Logger.isInfoEnabled && Logger.info(Util.breadcrumb(location, `callbackFinilized2--${actionLetter}3`))
Logger.isInfoEnabled && Logger.info(Util.breadcrumb(location, `callbackFinalized2--${actionLetter}3`))
Copy link
Member

Choose a reason for hiding this comment

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

I may be blind, but I do not see a difference here? :D

@@ -57,7 +57,7 @@ const migrate = (runMigrations) => {
}

const connectDatabase = async () => {
Logger.isDebugEnabled && Logger.debug(`Conneting to DB ${JSON.stringify(Config.DATABASE)}`)
Logger.isDebugEnabled && Logger.debug(`Connecting to DB ${JSON.stringify(Config.DATABASE)}`)
Copy link
Member

Choose a reason for hiding this comment

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

O_O

/**
* @class TestConsumer
* @description A Kafka consumer that listens for events from our test harness, and
* makes it easy to ensure that
Copy link
Member

Choose a reason for hiding this comment

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

makes it easy to ensure that....?

@@ -0,0 +1,163 @@
/*****
Copy link
Member

Choose a reason for hiding this comment

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

Is this necessary?

@mdebarros
Copy link
Member

Closing stale PR, and re-created new PR @ #874

@mdebarros mdebarros closed this Feb 8, 2022
mdebarros added a commit that referenced this pull request Feb 22, 2022
… scenarios (#874)

PR re-based from #872 from @lewisdaly. 

feat(mojaloop/project/issue2556): Implement patch notification for failure scenarios (following v1.1 update) - mojaloop/project#2556

chore: updated dependencies
- updated dependencies
- fixed audit issues
- fixed lint issues

fix([#2697](mojaloop/project#2697)): Central-Ledger Fulfil Handler does not correctly invalidate requests with an incorrect/non-existent FSP-ID in the FSPIOP-Destination header - mojaloop/project#2697
- fixed/added unit tests
- improved test coverage
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