-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix: avoid 2 extra db requests #1054
base: main
Are you sure you want to change the base?
Conversation
* feat(3574): updated prepare handler for FX * feat(3574): added fxTransfer related tables; updated validator for FX * feat(3574): added fxTransfer related tables; updated validator for FX * feat(3574): comments/todos * feat(3574): added fx roleTypes; added content.context * feat(3574): added cyril; updated unit-tests
* chore: updated central service shared lib * feat: added some changes for fx flow * feat: added changes for position prepare handler * chore: refactor cyril functions * feat: position-commit working * feat: upgraded central shared * chore(snapshot): 17.4.0-snapshot.0 * chore(snapshot): 17.4.0-snapshot.1 * chore(snapshot): 17.4.0-snapshot.2
* feat: add FX quotes endpointType and kafka topics * chore: upgrade cs-shared * chore: fix audit
… into feat/fx-impl
* fix: cluster performance testing issues (#996) * test: fix disconnect errors (#998) * chore(release): 17.6.1 [skip ci] * chore: fix current tests * boolean * chore: add endpoints to test data * fix endpoint import * chore: improve validator coverage * chore: move prepare tests into file to match src structure --------- Co-authored-by: Kalin Krustev <[email protected]> Co-authored-by: mojaloopci <[email protected]>
* chore: more coverage * coverage
…ndling (#1035) * chore: add integration test for batch * unit * reenable * chore: comments * feat: added timeout handler implementation * test * cleanup function * test * remove * reorder * fix potential int test failures * fix tests * fix: queries * unit tests * unskip * fix potential int test failures * reorder * fix replace * unit tests * fix: int tests * fix: issues * fix: fx timeout * chore: update central services shared * fix: cicd * fix: deps * fix: lint * fix: unit tests * chore: added unit tests * chore: added unit tests * pull,audit,dep * update tests * update position query logic * rename * add comment * detail --------- Co-authored-by: Vijay <[email protected]>
Quality Gate passedIssues Measures |
const cyrilOutput = await this.cyril.processFxFulfilMessage(transfer.commitRequestId, payload) | ||
if (!transfer.fxWatchListId) { | ||
throw new Error(`Commit request ID ${transfer.commitRequestId} not found in watch list`) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we still have a function in cyril 'processFxFulfilMessage' for this check? I mean. you can remove the call 'getAllDetailsByCommitRequestId' in that function, but I would recommend the queries (getItemInWatchListByCommitRequestId) on watchlist in the cyril functions instead of having a join in other place. Because the watchlist logic may change and I wouldn't suggest merging watchList in the places other than cyril. I know it's additional query but I hope it will not impact performance that much compared to left join.
@@ -90,9 +90,11 @@ const getAllDetailsByCommitRequestId = async (commitRequestId) => { | |||
.leftJoin('fxTransferStateChange AS tsc', 'tsc.commitRequestId', 'fxTransfer.commitRequestId') | |||
.leftJoin('transferState AS ts', 'ts.transferStateId', 'tsc.transferStateId') | |||
.leftJoin('fxTransferFulfilment AS tf', 'tf.commitRequestId', 'fxTransfer.commitRequestId') | |||
.leftJoin('fxWatchList AS wl', 'wl.commitRequestId', 'fxTransfer.commitRequestId') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my above comment.
No description provided.