- Add goals feature (models, migrations, API, web pages) - Add reserved/centralized wallet balance service - Add wallet detail page and overview components - Add new UI components (progress, multi-select, FAB) - Remove stray empty -H/-d files from working tree
22 lines
721 B
TypeScript
Executable File
22 lines
721 B
TypeScript
Executable File
import { PrismaService } from '../prisma/prisma.service';
|
|
import { Decimal } from '@prisma/client/runtime/library';
|
|
export interface WalletBalance {
|
|
walletId: string;
|
|
kind: string;
|
|
currency?: string;
|
|
unit?: string;
|
|
totalBalance: Decimal;
|
|
reservedBalance: Decimal;
|
|
availableBalance: Decimal;
|
|
totalUnits?: Decimal;
|
|
pricePerUnit?: Decimal;
|
|
totalValue?: Decimal;
|
|
}
|
|
export declare class WalletBalanceService {
|
|
private prisma;
|
|
constructor(prisma: PrismaService);
|
|
calculateBalance(walletId: string): Promise<WalletBalance>;
|
|
calculateMultipleBalances(walletIds: string[]): Promise<WalletBalance[]>;
|
|
getAllUserWalletBalances(userId: string): Promise<WalletBalance[]>;
|
|
}
|