diff --git a/src/bounties/bounties.controller.ts b/src/bounties/bounties.controller.ts index 38ad22e..b075f5e 100644 --- a/src/bounties/bounties.controller.ts +++ b/src/bounties/bounties.controller.ts @@ -33,8 +33,13 @@ import { ApiStandardErrorResponses, } from '../common/swagger/api-common-responses.decorator'; +<<<<<<< HEAD +class FundBountyDto { + @ApiProperty() +======= export class FundBountyDto { @ApiProperty({ description: 'Stellar public key of the funder' }) +>>>>>>> origin/main @IsStellarAddress() funderAddress: string; } diff --git a/src/escrow/escrow.service.ts b/src/escrow/escrow.service.ts index 6d2dd28..cbd9d02 100644 --- a/src/escrow/escrow.service.ts +++ b/src/escrow/escrow.service.ts @@ -745,6 +745,12 @@ export class EscrowService { `Unsupported escrow asset: ${String(input.asset)}`, ); } + const tokenContract = this.resolveTokenAddress(input.asset); + if (!tokenContract) { + throw new BadRequestException( + `Asset ${String(input.asset)} has no configured token contract on this server`, + ); + } this.assertExactlyOneParent(input); } diff --git a/src/maintenance-pool/dto/create-pool.dto.ts b/src/maintenance-pool/dto/create-pool.dto.ts index 3509257..e009854 100644 --- a/src/maintenance-pool/dto/create-pool.dto.ts +++ b/src/maintenance-pool/dto/create-pool.dto.ts @@ -28,10 +28,9 @@ export class CreatePoolDto { @IsUUID() repositoryId?: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - createdById?: string; + createdById: string; /** The sponsor's standing recurring commitment; deposits never overwrite it (#93). */ @ApiProperty({ required: false }) diff --git a/src/milestones/dto/create-milestone.dto.ts b/src/milestones/dto/create-milestone.dto.ts index 390ae26..f3549c0 100644 --- a/src/milestones/dto/create-milestone.dto.ts +++ b/src/milestones/dto/create-milestone.dto.ts @@ -20,10 +20,9 @@ export class CreateMilestoneDto { @IsUUID() repositoryId: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - sponsorId?: string; + sponsorId: string; @ApiProperty({ maxLength: 200 }) @Transform(({ value }: { value: unknown }) => diff --git a/src/milestones/milestones.controller.ts b/src/milestones/milestones.controller.ts index 0aaf9d9..87b3edf 100644 --- a/src/milestones/milestones.controller.ts +++ b/src/milestones/milestones.controller.ts @@ -45,6 +45,7 @@ export class ResolveIssueDto { required: false, description: 'Optional user UUID of the recipient', }) +>>>>>>> origin/main @IsOptional() @IsUUID() recipientId?: string; diff --git a/src/teams/dto/create-team.dto.ts b/src/teams/dto/create-team.dto.ts index e5487c2..ef81e3d 100644 --- a/src/teams/dto/create-team.dto.ts +++ b/src/teams/dto/create-team.dto.ts @@ -49,10 +49,9 @@ export class CreateTeamDto { @MaxLength(100) name: string; - @ApiProperty({ required: false }) - @IsOptional() + @ApiProperty() @IsUUID() - createdById?: string; + createdById: string; @ApiProperty({ type: [TeamMemberSplitDto] }) @ArrayMinSize(1)