forked from MergeFi/backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfund-escrow.dto.ts
More file actions
36 lines (30 loc) · 900 Bytes
/
Copy pathfund-escrow.dto.ts
File metadata and controls
36 lines (30 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, IsString, IsUUID } from 'class-validator';
import { AssetType } from '../../common/enums';
import {
IsMoneyAmount,
IsSupportedEscrowAsset,
} from '../../common/validators/money.validator';
export class FundEscrowDto {
@ApiProperty({ description: 'Amount to lock in the escrow contract' })
@IsMoneyAmount()
amount: string;
@ApiProperty({ enum: AssetType, default: AssetType.USDC })
@IsSupportedEscrowAsset()
asset: AssetType;
@ApiProperty({ description: 'Stellar public key of the funding sponsor' })
@IsString()
funderAddress: string;
@ApiProperty({ required: false })
@IsOptional()
@IsUUID()
bountyId?: string;
@ApiProperty({ required: false })
@IsOptional()
@IsUUID()
milestoneId?: string;
@ApiProperty({ required: false })
@IsOptional()
@IsUUID()
maintenancePoolId?: string;
}