address best diff

This commit is contained in:
Ben Wilson
2023-07-24 22:23:29 -04:00
parent 8369e9eef2
commit a4b4e517cb
7 changed files with 48 additions and 16 deletions
-8
View File
@@ -45,14 +45,6 @@ export class ClientService {
return await this.clientRepository.count();
}
public async getBestDiff(address: string) {
const res = await this.clientRepository.createQueryBuilder('client')
.select('MAX(client.bestDifficulty)', 'bestDifficulty')
.where('client.address = :address', { address })
.withDeleted()
.getRawOne();
return res?.bestDifficulty;
}
public async getByAddress(address: string): Promise<ClientEntity[]> {
return await this.clientRepository.find({
where: {