|
|
@ -22,9 +22,17 @@ export class AccountClusterRiskSingleAccount extends Rule<RuleSettings> { |
|
|
|
} |
|
|
|
|
|
|
|
public evaluate() { |
|
|
|
const accounts: string[] = Object.keys(this.accounts); |
|
|
|
const accountIds: string[] = Object.keys(this.accounts); |
|
|
|
|
|
|
|
if (accounts.length === 1) { |
|
|
|
if (accountIds.length === 0) { |
|
|
|
return { |
|
|
|
evaluation: this.i18nService.getTranslation({ |
|
|
|
id: 'rule.accountClusterRiskSingleAccount.false.invalid', |
|
|
|
languageCode: this.getLanguageCode() |
|
|
|
}), |
|
|
|
value: false |
|
|
|
}; |
|
|
|
} else if (accountIds.length === 1) { |
|
|
|
return { |
|
|
|
evaluation: this.i18nService.getTranslation({ |
|
|
|
id: 'rule.accountClusterRiskSingleAccount.false', |
|
|
@ -39,7 +47,7 @@ export class AccountClusterRiskSingleAccount extends Rule<RuleSettings> { |
|
|
|
id: 'rule.accountClusterRiskSingleAccount.true', |
|
|
|
languageCode: this.getLanguageCode(), |
|
|
|
placeholders: { |
|
|
|
accountsLength: accounts.length |
|
|
|
accountsLength: accountIds.length |
|
|
|
} |
|
|
|
}), |
|
|
|
value: true |
|
|
|