This commit is contained in:
Ben Wilson
2023-12-04 08:33:47 -05:00
parent 0b147ea5db
commit 5a17528b8f
3 changed files with 4 additions and 4 deletions
@@ -14,9 +14,9 @@ export class AddressSettingsService {
}
public async getSettings(address: string) {
public async getSettings(address: string, createIfNotFound: boolean) {
const settings = await this.addressSettingsRepository.findOne({ where: { address } });
if (settings == null) {
if (createIfNotFound == true && settings == null) {
return await this.createNew(address);
}
return settings;