Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export const createMenuColumn = createColumn(
padding: 0,
width: '0',
},
sort: false,
},
);
1 change: 1 addition & 0 deletions projects/matez/src/lib/components/value/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './value.component';
export * from './components/value-list.component';
export * from './components/menu-value.component';
export * from './types/value';
export * from './types/base-type';
68 changes: 67 additions & 1 deletion src/api/payment-processing/stores/parties-store.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ import { MemoizeExpiring } from 'typescript-memoize';

import { Injectable, inject } from '@angular/core';

import { PartyConfigRef, ShopConfigObject, ShopID, WalletID } from '@vality/domain-proto/domain';
import {
PartyConfigRef,
ShopConfigObject,
ShopID,
WalletConfigObject,
WalletID,
} from '@vality/domain-proto/domain';
import { VersionedObjectInfo } from '@vality/domain-proto/domain_config_v2';

import { DomainObjectsStoreService, DomainService } from '../../domain-config';
Expand Down Expand Up @@ -137,4 +143,64 @@ export class PartiesStoreService {
},
]);
}

blockWallet(wallet: WalletConfigObject, reason: string) {
const newWalletConfig = cloneDeep(wallet);
newWalletConfig.data.block = { blocked: { reason, since: new Date().toISOString() } };

return this.domainService.commit([
{
update: {
object: {
wallet_config: newWalletConfig,
},
},
},
]);
}

unblockWallet(wallet: WalletConfigObject, reason: string) {
const newWalletConfig = cloneDeep(wallet);
newWalletConfig.data.block = { unblocked: { reason, since: new Date().toISOString() } };

return this.domainService.commit([
{
update: {
object: {
wallet_config: newWalletConfig,
},
},
},
]);
}

suspendWallet(wallet: WalletConfigObject) {
const newWalletConfig = cloneDeep(wallet);
newWalletConfig.data.suspension = { suspended: { since: new Date().toISOString() } };

return this.domainService.commit([
{
update: {
object: {
wallet_config: newWalletConfig,
},
},
},
]);
}

activateWallet(wallet: WalletConfigObject) {
const newWalletConfig = cloneDeep(wallet);
newWalletConfig.data.suspension = { active: { since: new Date().toISOString() } };

return this.domainService.commit([
{
update: {
object: {
wallet_config: newWalletConfig,
},
},
},
]);
}
}
14 changes: 1 addition & 13 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Keycloak from 'keycloak-js';
import { debounceTime, map, of, shareReplay, switchMap, tap } from 'rxjs';

import { CommonModule } from '@angular/common';
import { Component, DestroyRef, inject, isDevMode, signal } from '@angular/core';
import { Component, DestroyRef, inject, signal } from '@angular/core';
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
import { MatButtonModule } from '@angular/material/button';
import { MatIconModule } from '@angular/material/icon';
Expand Down Expand Up @@ -127,18 +127,6 @@ const createNavLinks = (): Link[] => [
url: `${partyPath}/routing-rules/withdrawal/main`,
checkUrl: `${partyPath}/routing-rules/withdrawal`,
},
{
label: 'Payment RR (in dev)',
url: `${partyPath}/rr/payment/main`,
checkUrl: `${partyPath}/rr/payment`,
isHidden: !isDevMode,
},
{
label: 'Withdrawal RR (in dev)',
url: `${partyPath}/rr/withdrawal/main`,
checkUrl: `${partyPath}/rr/withdrawal`,
isHidden: !isDevMode,
},
]
: [],
};
Expand Down
7 changes: 1 addition & 6 deletions src/app/parties/party/party-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ import { ROUTING_CONFIG as WEBHOOKS_ROUTING_CONFIG } from './webhooks/routing-co
path: 'shops',
loadChildren: () => import('./shops').then((m) => m.PartyShopsModule),
},
{
path: 'rr',
loadChildren: () =>
import('./routing-rules').then((m) => m.RoutingRulesModule),
},
{
path: 'routing-rules',
loadChildren: () =>
import('./routing-rules-old').then((m) => m.RoutingRulesModule),
import('./routing-rules').then((m) => m.RoutingRulesModule),
},
{
path: 'wallets',
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading