Skip to content
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

Vapt fix #3415

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:usesCleartextTraffic="false"
android:theme="@style/AppTheme">

<activity
Expand Down
12 changes: 6 additions & 6 deletions src/app/core/services/real-time-feed.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('RealTimeFeedService', () => {

realTimeFeedService = TestBed.inject(RealTimeFeedService);
spenderPlatformV1ApiService = TestBed.inject(
SpenderPlatformV1ApiService,
SpenderPlatformV1ApiService
) as jasmine.SpyObj<SpenderPlatformV1ApiService>;
});

Expand Down Expand Up @@ -105,7 +105,7 @@ describe('RealTimeFeedService', () => {
spyOn(realTimeFeedService, 'getCardTypeFromNumber').and.returnValue(CardNetworkType.OTHERS);

expect(() => realTimeFeedService.enroll('6111111111111111')).toThrowError(
`Invalid card type ${CardNetworkType.OTHERS}`,
`Invalid card type ${CardNetworkType.OTHERS}`
);

expect(realTimeFeedService.getCardTypeFromNumber).toHaveBeenCalledOnceWith('6111111111111111');
Expand All @@ -120,8 +120,8 @@ describe('RealTimeFeedService', () => {
error: {
message: 'This card already exists in the system',
},
}),
),
})
)
);

realTimeFeedService
Expand All @@ -130,7 +130,7 @@ describe('RealTimeFeedService', () => {
catchError((error: Error) => {
expect(error.message).toEqual('This card already exists in the system');
return of(null);
}),
})
)
.subscribe();
}));
Expand Down Expand Up @@ -189,7 +189,7 @@ describe('RealTimeFeedService', () => {
spyOn(realTimeFeedService, 'getCardType').and.returnValue(CardNetworkType.OTHERS);

expect(() => realTimeFeedService.unenroll(statementUploadedCard)).toThrowError(
`Invalid card type ${CardNetworkType.OTHERS}`,
`Invalid card type ${CardNetworkType.OTHERS}`
);

expect(realTimeFeedService.getCardType).toHaveBeenCalledOnceWith(statementUploadedCard);
Expand Down
2 changes: 1 addition & 1 deletion src/app/core/services/real-time-feed.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class RealTimeFeedService {
catchError((err: HttpErrorResponse) => {
const error = err.error as PlatformApiError;
return throwError(() => Error(error.message));
}),
})
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ export class DependentFieldsComponent implements OnInit, OnDestroy, OnChanges {

onPageExit$: Subject<void>;

constructor(
private dependentFieldsService: DependentFieldsService,
private formBuilder: FormBuilder,
) {}
constructor(private dependentFieldsService: DependentFieldsService, private formBuilder: FormBuilder) {}

ngOnInit(): void {
return;
Expand Down Expand Up @@ -63,15 +60,15 @@ export class DependentFieldsComponent implements OnInit, OnDestroy, OnChanges {
addDependentFieldWithValue(
txCustomProperties: CustomProperty<string>[],
dependentFields: ExpenseField[],
parentField: { id: number; value: string },
parentField: { id: number; value: string }
): void {
//Get dependent field for the field whose id is parentFieldId
const dependentField = dependentFields.find((dependentField) => dependentField.parent_field_id === parentField.id);

if (dependentField) {
//Get selected value for dependent field
const dependentFieldValue = txCustomProperties.find(
(customProp) => customProp.name === dependentField.field_name,
(customProp) => customProp.name === dependentField.field_name
);

if (dependentFieldValue?.value) {
Expand Down Expand Up @@ -101,10 +98,10 @@ export class DependentFieldsComponent implements OnInit, OnDestroy, OnChanges {

getDependentField(
parentFieldId: number,
parentFieldValue: string,
parentFieldValue: string
): Observable<{ dependentField: ExpenseField; parentFieldValue: string }> {
const dependentField = this.dependentCustomFields.find(
(dependentCustomField) => dependentCustomField.parent_field_id === parentFieldId,
(dependentCustomField) => dependentCustomField.parent_field_id === parentFieldId
);
if (dependentField && parentFieldValue) {
return this.dependentFieldsService
Expand All @@ -116,8 +113,8 @@ export class DependentFieldsComponent implements OnInit, OnDestroy, OnChanges {
})
.pipe(
map((dependentFieldOptions) =>
dependentFieldOptions?.length > 0 ? { dependentField, parentFieldValue } : null,
),
dependentFieldOptions?.length > 0 ? { dependentField, parentFieldValue } : null
)
);
}
return of(null);
Expand Down Expand Up @@ -164,7 +161,7 @@ export class DependentFieldsComponent implements OnInit, OnDestroy, OnChanges {
//TODO: Fix Types Here
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
const updatedFieldIndex = this.dependentFieldsFormArray.value.findIndex(
(depField: { label: string }) => depField.label === data.label,
(depField: { label: string }) => depField.label === data.label
) as number;

//If this is not the last dependent field then remove all fields after this one and create new field based on this field.
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/components/fy-number/fy-number.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class FyNumberComponent implements ControlValueAccessor, OnInit, AfterVie
constructor(
private platform: Platform,
private launchDarklyService: LaunchDarklyService,
private injector: Injector,
private injector: Injector
) {}

get value(): number {
Expand Down Expand Up @@ -112,7 +112,7 @@ export class FyNumberComponent implements ControlValueAccessor, OnInit, AfterVie
this.launchDarklyService
.checkIfNegativeExpensePluginIsEnabled()
.subscribe(
(isNegativeExpensePluginEnabled) => (this.isNegativeExpensePluginEnabled = isNegativeExpensePluginEnabled),
(isNegativeExpensePluginEnabled) => (this.isNegativeExpensePluginEnabled = isNegativeExpensePluginEnabled)
);

this.launchDarklyService
Expand Down
Loading