Add payout modes and production switchover schema

This commit is contained in:
Ben
2026-06-20 13:59:05 -04:00
parent a33c530268
commit a9d425f32f
61 changed files with 4164 additions and 1029 deletions
+18 -1
View File
@@ -1,6 +1,6 @@
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { In, Repository } from 'typeorm';
import { ClientEntity } from './client.entity';
@@ -62,6 +62,23 @@ export class ClientService {
return await this.clientRepository.count();
}
public async getActiveIds(ids: string[]): Promise<Set<string>> {
if (ids.length === 0) {
return new Set();
}
const clients = await this.clientRepository.find({
select: {
id: true,
},
where: {
id: In(ids),
},
});
return new Set(clients.map(client => client.id));
}
public async getByAddress(address: string): Promise<ClientEntity[]> {
return await this.clientRepository.find({
where: {