diff --git a/package-lock.json b/package-lock.json index f57995e59..e256ed69f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "@sentry/angular": "^10.68.0", "@tailwindcss/postcss": "^4.3.1", "@vality/domain-proto": "^2.0.2-7280b62.0", - "@vality/fistful-proto": "^2.0.1-441d9bc.0", + "@vality/fistful-proto": "^2.0.1-360c737.0", "@vality/machinegun-proto": "^1.0.1-273f2f3.0", "@vality/magista-proto": "^2.0.2-bd58cea.0", "@vality/repairer-proto": "^2.0.2-07b2a51.0", @@ -5728,17 +5728,21 @@ "license": "Apache-2.0" }, "node_modules/@vality/fistful-proto": { - "version": "2.0.1-441d9bc.0", - "resolved": "https://registry.npmjs.org/@vality/fistful-proto/-/fistful-proto-2.0.1-441d9bc.0.tgz", - "integrity": "sha512-d03yAxK0DKM0K55vPXz24kMep/ZyrMJFVh4ndHIYpl+eneAOuasvqMpKccaP/3+CBrmWZK8IgJ1hWePQtH/mBw==", + "version": "2.0.1-360c737.0", + "resolved": "https://registry.npmjs.org/@vality/fistful-proto/-/fistful-proto-2.0.1-360c737.0.tgz", + "integrity": "sha512-G4CCUXViRouRg1v9Eht7lLQND7DesOSDkLpCIFBELLqtG72ZCou//it3esSP3GeNTNncAuk2PJgPDkwlFdLBOQ==", "license": "Apache-2.0" }, "node_modules/@vality/machinegun-proto": { "version": "1.0.1-273f2f3.0", + "resolved": "https://registry.npmjs.org/@vality/machinegun-proto/-/machinegun-proto-1.0.1-273f2f3.0.tgz", + "integrity": "sha512-zShhcugJBTQqyYb8+Y1H823s7GaPW/hpUWX0t7tEFq54VfGTrgRRlkitY7orevlp1PcX3vwlwk1T80Ua4n56dA==", "license": "Apache-2.0" }, "node_modules/@vality/magista-proto": { "version": "2.0.2-bd58cea.0", + "resolved": "https://registry.npmjs.org/@vality/magista-proto/-/magista-proto-2.0.2-bd58cea.0.tgz", + "integrity": "sha512-6jNrpKRw4TbJ+HKs+3sbfZWw54uJb8OzqWEdiQ0QS1q69mbl4DlK8BF5fem4PEj/tAkAU0YqYphjxSgFDyOf7g==", "license": "Apache-2.0" }, "node_modules/@vality/matez": { @@ -5751,10 +5755,14 @@ }, "node_modules/@vality/repairer-proto": { "version": "2.0.2-07b2a51.0", + "resolved": "https://registry.npmjs.org/@vality/repairer-proto/-/repairer-proto-2.0.2-07b2a51.0.tgz", + "integrity": "sha512-f9zXp7xk7Jj7U8i1ssMGpA3amxZXRFvn4tCNY1WMc/AGlefLfURdPIo0NDTMYHCz7MyqFJe0zay/PoIVm9aymA==", "license": "Apache-2.0" }, "node_modules/@vality/scrooge-proto": { "version": "0.1.1-eec9e06.0", + "resolved": "https://registry.npmjs.org/@vality/scrooge-proto/-/scrooge-proto-0.1.1-eec9e06.0.tgz", + "integrity": "sha512-cFwodEITH3Z1zAMbRa6ZGwoayWJgfTMt2JE05CRxdWxow9JB8SNa5SItuuldOkckff2LU7IiDNtwOuFopKB+vw==", "license": "Apache-2.0" }, "node_modules/@vality/thrift-ts": { diff --git a/package.json b/package.json index 44e352ac4..ffd8409fc 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@sentry/angular": "^10.68.0", "@tailwindcss/postcss": "^4.3.1", "@vality/domain-proto": "^2.0.2-7280b62.0", - "@vality/fistful-proto": "^2.0.1-441d9bc.0", + "@vality/fistful-proto": "^2.0.1-360c737.0", "@vality/machinegun-proto": "^1.0.1-273f2f3.0", "@vality/magista-proto": "^2.0.2-bd58cea.0", "@vality/repairer-proto": "^2.0.2-07b2a51.0", diff --git a/src/api/services.ts b/src/api/services.ts index 98efb1250..14bf21c42 100644 --- a/src/api/services.ts +++ b/src/api/services.ts @@ -178,6 +178,14 @@ export const services = [ service: 'WebhookManager', public: 'WalletsWebhookManager', }, + { + name: Service.DestinationManagement, + loader: () => import('@vality/fistful-proto/destination').then((m) => m.Management), + metadata$: fistfulMetadata$, + namespace: 'destination', + service: 'Management', + public: 'DestinationManagement', + }, ] as const; export const { services: injectableServices, provideThriftServices } = @@ -201,4 +209,5 @@ export const { WalletsWebhookManager: ThriftWalletWebhooksManagementService, Accounter: ThriftAccountManagementService, InvoiceTemplating: ThriftInvoiceTemplatingService, + DestinationManagement: ThriftDestinationManagementService, } = injectableServices; diff --git a/src/app/withdrawals/withdrawals.component.ts b/src/app/withdrawals/withdrawals.component.ts index 2a8549752..484e2e49f 100644 --- a/src/app/withdrawals/withdrawals.component.ts +++ b/src/app/withdrawals/withdrawals.component.ts @@ -27,6 +27,7 @@ import { import { getUnionKey } from '@vality/ng-thrift'; import { WithdrawalParams } from '~/api/fistful-stat'; +import { ThriftDestinationManagementService } from '~/api/services'; import { FailMachinesDialogComponent, Type } from '~/components/fail-machines-dialog'; import { createCurrencyColumn, createDomainObjectColumn, createFailureColumn } from '~/utils'; @@ -57,6 +58,7 @@ interface WithdrawalsForm { }) export class WithdrawalsComponent implements OnInit { private fetchWithdrawalsService = inject(FetchWithdrawalsService); + private destinationManagementService = inject(ThriftDestinationManagementService); private fb = inject(NonNullableFormBuilder); private qp = inject>>( QueryParamsService>, @@ -95,6 +97,16 @@ export class WithdrawalsComponent implements OnInit { header: 'Wallet', }), { field: 'destination_id' }, + { + field: 'destination', + lazyCell: (d) => + this.destinationManagementService.Get(d.destination_id, {}).pipe( + map((d) => ({ + value: d.name, + description: d.realm === 0 ? 'test' : 'live', + })), + ), + }, createCurrencyColumn((d) => ({ amount: d.amount, code: d.currency_symbolic_code }), { field: 'amount', }), diff --git a/src/services/app-auth-guard/services.ts b/src/services/app-auth-guard/services.ts index bcf85c6c0..035fbec20 100644 --- a/src/services/app-auth-guard/services.ts +++ b/src/services/app-auth-guard/services.ts @@ -21,4 +21,5 @@ export enum Service { WithdrawalManagement = 'WithdrawalManagement', SourceManagement = 'SourceManagement', WalletsWebhookManager = 'WalletsWebhookManager', + DestinationManagement = 'DestinationManagement', }