Skip to content

Commit

Permalink
feat(hub): bypass fraud api call on us manager hub (#12337)
Browse files Browse the repository at this point in the history
ref: MANAGER-14574

Signed-off-by: Omar ALKABOUSS MOUSSANA <[email protected]>
  • Loading branch information
oalkabouss authored Sep 5, 2024
1 parent 940c891 commit 93f71c5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ export const FRAUD_STATUS = {
REQUIRED: 'required',
};

export const FEATURES = {
proceduresFraud: 'procedures:fraud',
};

const TRACK_IMPRESSION = {
campaignId: 'kyc-fraud',
creation: 'notification',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,35 @@ import {
FRAUD_STATUS,
TRACK_IMPRESSION_REQUIRED,
TRACK_IMPRESSION_OPEN,
FEATURES,
} from './kyc-fraud-banner.constants';

export default class KycFraudBannerController {
/* @ngInject */
constructor($http, $q, coreURLBuilder, atInternet) {
constructor($http, $q, coreURLBuilder, atInternet, ovhFeatureFlipping) {
this.$http = $http;
this.$q = $q;
this.coreURLBuilder = coreURLBuilder;
this.atInternet = atInternet;
this.TRACK_IMPRESSION_REQUIRED = TRACK_IMPRESSION_REQUIRED;
this.TRACK_IMPRESSION_OPEN = TRACK_IMPRESSION_OPEN;
this.ovhFeatureFlipping = ovhFeatureFlipping;
}

$onInit() {
this.showRequiredBanner = false;
this.showOpenBanner = false;

this.ovhFeatureFlipping
.checkFeatureAvailability(FEATURES.proceduresFraud)
.then((result) => {
if (result.isFeatureAvailable(FEATURES.proceduresFraud)) {
this.initFraud();
}
});
}

initFraud() {
this.documentLink = this.coreURLBuilder.buildURL(
'dedicated',
'#/documents',
Expand Down

0 comments on commit 93f71c5

Please sign in to comment.