-
Notifications
You must be signed in to change notification settings - Fork 201
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
bal 1589 rules after schema changes #2187
bal 1589 rules after schema changes #2187
Conversation
commit 13e2390bf0940df4e3276b64c11b2c75cb7400eb Author: Lior Zamir <[email protected]> Date: Mon Mar 11 16:21:33 2024 +0200 chore: remove non used rules commit 34f8eff Author: Lior Zamir <[email protected]> Date: Mon Mar 11 16:17:20 2024 +0200 fix: add missing private functions commit e5d7552 Merge: 51afe72 00aa41e Author: Lior Zamir <[email protected]> Date: Wed Mar 6 01:22:29 2024 +0200 chore: merge branch commit 51afe72 Author: Lior Zamir <[email protected]> Date: Wed Mar 6 01:19:39 2024 +0200 fix: ts issues commit fe9cf42 Author: Lior Zamir <[email protected]> Date: Wed Mar 6 01:15:56 2024 +0200 fix: ts issues commit 00aa41e Author: Lior Zamir <[email protected]> Date: Wed Mar 6 00:59:53 2024 +0200 fix(generate-alerts.ts): import missing types and add missing type annotation for TransactionRecordType fix(alert.service.ts): add error handling when checking alert and log error message and definition ID fix(data-analytics.service.ts): fix formatting and indentation for better readability feat(data-analytics.service.ts): add support for evaluating payment unexpected based on customer expected amount feat(data-analytics.service.ts): add support for evaluating dormant accounts based on transaction history feat(data-analytics.service.ts): add support for evaluating customers' transaction type based on various criteria feat(types.ts): add support for new transaction record type and generic async function type feat(types.ts): add new options for TCustomersTransactionTypeOptions to support more flexible customer transaction filtering feat(types.ts): add new options for TDormantAccountOption to support evaluating dormant accounts feat(types.ts): add new evaluate functions for evaluating transactions against dynamic rules and dormant accounts commit 7b0dddf Author: Lior Zamir <[email protected]> Date: Wed Mar 6 00:59:53 2024 +0200 feat: add more rules
|
@@ -91,7 +104,7 @@ export const ALERT_INLINE_RULES = [ | |||
havingAggregate: AggregateType.COUNT, | |||
|
|||
direction: 'inbound', | |||
excludedCounterpartyIds: ['9999999999999999', '999999******9999'], | |||
// excludedCounterparty: ['9999999999999999', '999999******9999'], |
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.
Consider deleting this line instead of commenting it.
@@ -119,7 +132,7 @@ export const ALERT_INLINE_RULES = [ | |||
havingAggregate: AggregateType.COUNT, | |||
|
|||
direction: 'inbound', | |||
excludedCounterpartyIds: ['9999999999999999', '999999******9999'], | |||
// excludedCounterparty: ['9999999999999999', '999999******9999'], |
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.
Same
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.
we need to modify this exclusion from other rules.
so once i changed the type i had to take care for it cross all other rules
for (let p in obj) { | ||
if (p in obj && prop === `${p}`.toLowerCase()) { |
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.
Use .hasOwnProperty
for (let p in obj) { | |
if (p in obj && prop === `${p}`.toLowerCase()) { | |
for (const p in obj) { | |
if (obj.hasOwnProperty(p) && prop === p.toLowerCase()) { |
Or use Object.keys()
for (let p in obj) { | |
if (p in obj && prop === `${p}`.toLowerCase()) { | |
for (const p of Object.keys(obj)) { | |
if (prop === p.toLowerCase()) { |
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.
property can be also non string
that's why i've used ${p}
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.
eslint rule
7:13 error Do not access Object.prototype method 'hasOwnProperty' from target object no-prototype-builtins
Co-authored-by: Matan Yadaev <[email protected]>
…erine-io/ballerine into bal-1589-rules-after-schema-changes
…into bal-1589-rules-after-schema-changes
No description provided.