-
-
Notifications
You must be signed in to change notification settings - Fork 684
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 default undefined option for payeename in KBC integration #533
Conversation
WalkthroughThe pull request introduces a modification to the Possibly related PRs
Suggested labels
Suggested reviewers
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
src/app-gocardless/banks/kbc_kredbebb.js (1)
Line range hint
28-34
: Consider adding the same fallback for negative amountsWhile the positive amount case now has a fallback 'undefined' value, the negative amount case might still return undefined if both
creditorName
and the extracted payee name are falsy. Consider applying the same fallback pattern here for consistency.payeeName: transaction.creditorName || extractPayeeNameFromRemittanceInfo( transaction.remittanceInformationUnstructured, ['Betaling met', 'Domiciliëring', 'Overschrijving'], - ), + ) || 'undefined',
🧹 Nitpick comments (1)
src/app-gocardless/banks/kbc_kredbebb.js (1)
Line range hint
11-13
: Update JSDoc comment to reflect the fallback behaviorThe current comment only describes the payee information source for negative amounts. Consider updating it to document the fallback behavior for both positive and negative amounts.
/** * For negative amounts, the only payee information we have is returned in * remittanceInformationUnstructured. + * Falls back to 'undefined' if no payee information is available. */
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
upcoming-release-notes/533.md
is excluded by!**/*.md
📒 Files selected for processing (1)
src/app-gocardless/banks/kbc_kredbebb.js
(1 hunks)
🔇 Additional comments (1)
src/app-gocardless/banks/kbc_kredbebb.js (1)
20-21
: LGTM! The fallback value addition looks good.The addition of 'undefined' as a fallback value for positive amount transactions aligns with the PR objective and ensures consistent payeeName handling when no value is available.
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.
LGTM
Added a default undefined option as Payeename for the KBC integration as this is not always available as described in issue: #532 .