feat: Implement generic BaseMessage functionality#394
Conversation
📝 WalkthroughWalkthroughThis PR updates two Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 39-40: The package changes swap `@tazama-lf/frms-coe-lib` and
`@tazama-lf/frms-coe-startup-lib` from the rc track (7.0.2-rc.2 / 3.0.2-rc.2) to
experimental PSL pre-releases (0.0.1-psl.*); confirm these PSL pre-release
versions are acceptable by validating API compatibility and stability: review
change logs or diff between "@tazama-lf/frms-coe-lib" and
"@tazama-lf/frms-coe-startup-lib" versions, run full unit/integration/e2e tests
against the new packages, pin the dependency (or use a safe semver range) if
approved, or revert to the previous rc versions if breaking changes are found,
and add a short comment in package.json or the PR describing the chosen decision
and the validation performed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 66697f7a-40d0-48a7-ab6e-5aee26c717cc
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
package.jsonsrc/logic.service.ts
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
…ot target-branch - src/logic.service.ts: if/if chain replaced with if/else if/else; let transactionId uninitialised to enforce TypeScript definite assignment; explicit loggerService.error and return on unrecognised transaction type; import moved to frms-coe-lib root export - __tests__/unit/logic.service.test.ts: unsupported-type test added (35 -> 36 tests) - package.json: eslint bumped from ^9.36.0 to ^9.39.4 (fixes unified-signatures crash) - .github/dependabot.yml: target-branch set to dev Closes #401
SPDX-License-Identifier: Apache-2.0
This pull request updates the handling of transaction messages to improve type safety and compatibility with new versions of the
@tazama-lf/frms-coe-libdependencies. The main changes involve updating dependency versions, generalizing transaction typing, and using new type guards to extract transaction IDs more robustly.Dependency Updates:
@tazama-lf/frms-coe-liband@tazama-lf/frms-coe-startup-libto new pre-release versions to ensure compatibility with recent changes in their APIs.Type Handling Improvements:
Pacs002to the more generalSupportedTransactionMessagein multiple places to support a wider range of transaction message types. [1] [2] [3]Logic and Type Guard Enhancements:
isBaseMessageTransaction,isPacs002Transaction) from the updated library to more accurately determine the structure of incoming transactions and extract the correct transaction ID field depending on the message type. [1] [2]These changes collectively make the codebase more flexible and robust when dealing with different transaction message types and prepare it for future enhancements in the related libraries.
What did we change?
Why are we doing this?
How was it tested?
Summary by CodeRabbit
Chores
Improvements