mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-06 02:25:17 +00:00
Merge branch 'master' into ft/add-codeql
This commit is contained in:
commit
d5a4149a00
18
renovate.json
Normal file
18
renovate.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackagePatterns": [
|
||||
"*"
|
||||
],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch"
|
||||
],
|
||||
"groupName": "all non-major dependencies",
|
||||
"groupSlug": "all-minor-patch"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
export interface CurrencySource {
|
||||
source: string;
|
||||
currency: string;
|
||||
}
|
||||
|
||||
export const CURRENCIES: CurrencySource[] = [
|
||||
{ source: '3', currency: 'RUB' },
|
||||
{ source: '5', currency: 'UAH' },
|
||||
{ source: 'eskin1', currency: 'USD' },
|
||||
{ source: 'eskin2', currency: 'EUR' },
|
||||
{ source: 'eskin3', currency: 'KZT' },
|
||||
{ source: 'eskin5', currency: 'BYN' },
|
||||
{ source: '667c1494-a334-4cd4-b350-712917fc6f8e', currency: 'UZS' },
|
||||
];
|
@ -6,7 +6,7 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
|
||||
|
||||
import { AppAuthGuardService, DepositRole } from '@cc/app/shared/services';
|
||||
|
||||
import { CURRENCIES } from '../constants/currencies';
|
||||
import { ConfigService } from '../../../core/config.service';
|
||||
import { CreateDepositService } from './services/create-deposit/create-deposit.service';
|
||||
|
||||
@UntilDestroy()
|
||||
@ -19,7 +19,7 @@ import { CreateDepositService } from './services/create-deposit/create-deposit.s
|
||||
export class CreateDepositDialogComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
|
||||
currencies = CURRENCIES;
|
||||
currencies = this.configService.config.constants.currencies;
|
||||
|
||||
depositCreated$ = this.createDepositService.depositCreated$;
|
||||
isLoading$ = this.createDepositService.isLoading$;
|
||||
@ -31,7 +31,8 @@ export class CreateDepositDialogComponent implements OnInit {
|
||||
private createDepositService: CreateDepositService,
|
||||
private snackBar: MatSnackBar,
|
||||
private dialogRef: MatDialogRef<CreateDepositDialogComponent>,
|
||||
private authGuardService: AppAuthGuardService
|
||||
private authGuardService: AppAuthGuardService,
|
||||
private configService: ConfigService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
|
@ -13,11 +13,11 @@ import { createDepositStopPollingCondition } from '@cc/app/shared/utils';
|
||||
import { poll } from '@cc/utils/poll';
|
||||
import { toMinor } from '@cc/utils/to-minor';
|
||||
|
||||
import { ConfigService } from '../../../../../core/config.service';
|
||||
import { FistfulAdminService } from '../../../../../thrift-services/fistful/fistful-admin.service';
|
||||
import { FistfulStatisticsService } from '../../../../../thrift-services/fistful/fistful-stat.service';
|
||||
import { DepositParams } from '../../../../../thrift-services/fistful/gen-model/fistful_admin';
|
||||
import { StatDeposit } from '../../../../../thrift-services/fistful/gen-model/fistful_stat';
|
||||
import { CURRENCIES } from '../../../constants/currencies';
|
||||
import { SearchParams } from '../../../types/search-params';
|
||||
|
||||
@Injectable()
|
||||
@ -81,7 +81,8 @@ export class CreateDepositService {
|
||||
private fistfulStatisticsService: FistfulStatisticsService,
|
||||
private keycloakService: KeycloakService,
|
||||
private fb: FormBuilder,
|
||||
private idGenerator: UserInfoBasedIdGeneratorService
|
||||
private idGenerator: UserInfoBasedIdGeneratorService,
|
||||
private configService: ConfigService
|
||||
) {}
|
||||
|
||||
createDeposit() {
|
||||
@ -92,7 +93,7 @@ export class CreateDepositService {
|
||||
return this.fb.group({
|
||||
destination: ['', Validators.required],
|
||||
amount: ['', [Validators.required, Validators.pattern(/^\d+([,.]\d{1,2})?$/)]],
|
||||
currency: [CURRENCIES[0], Validators.required],
|
||||
currency: [this.configService.config.constants.currencies[0], Validators.required],
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import { MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
|
||||
import { CURRENCIES } from '../constants/currencies';
|
||||
import { ConfigService } from '../../../core/config.service';
|
||||
import { SearchParams } from '../types/search-params';
|
||||
import { SearchFiltersService } from './services/search-filters/search-filters.service';
|
||||
|
||||
@ -39,11 +39,14 @@ export class SearchFiltersComponent implements OnInit {
|
||||
|
||||
depositStatuses = ['Pending', 'Succeeded', 'Failed'];
|
||||
|
||||
currencies = CURRENCIES;
|
||||
currencies = this.configService.config.constants.currencies;
|
||||
|
||||
form = this.searchFiltersService.form;
|
||||
|
||||
constructor(private searchFiltersService: SearchFiltersService) {
|
||||
constructor(
|
||||
private searchFiltersService: SearchFiltersService,
|
||||
private configService: ConfigService
|
||||
) {
|
||||
this.searchFiltersService.searchParamsChanges$.subscribe((params) =>
|
||||
this.valueChanges.emit(params)
|
||||
);
|
||||
|
@ -1,4 +1,7 @@
|
||||
{
|
||||
"papiEndpoint": "",
|
||||
"fileStorageEndpoint": ""
|
||||
"fileStorageEndpoint": "",
|
||||
"constants": {
|
||||
"currencies": []
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user