sync clinets

This commit is contained in:
Ben Wilson
2023-07-24 22:43:31 -04:00
parent f3860b7a76
commit e05beaf915
2 changed files with 7 additions and 10 deletions
@@ -15,7 +15,11 @@ export class AddressSettingsService {
}
public async getSettings(address: string) {
return await this.addressSettingsRepository.findOne({ where: { address } });
const settings = await this.addressSettingsRepository.findOne({ where: { address } });
if (settings == null) {
return await this.createNew(address);
}
return settings;
}
public async updateBestDifficulty(address: string, bestDifficulty: number) {