diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index 03ef08aa..43d9c988 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -324,7 +324,9 @@ export class Registry { paymentAddress: auctionWinner, }); - const newRecords = records.filter(record => record.names !== null); + const newRecords = records.filter(record => { + return record.names !== null && record.names.length > 0; + }); for (const record of newRecords) { if (record.id) { diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index 98f19476..b142ad67 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -1391,10 +1391,12 @@ export class Service { amountToBeReturned = totalAuctionPrice; } - await this.laconicRegistry.sendTokensToAccount( - project.paymentAddress, - amountToBeReturned.toString() - ); + if (amountToBeReturned !== 0) { + await this.laconicRegistry.sendTokensToAccount( + project.paymentAddress, + amountToBeReturned.toString() + ); + } } async getDeployers(): Promise {