From 781b6673194a5378a7f7e7fb79461bcbd44c34db Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Tue, 29 Oct 2024 13:58:22 +0530 Subject: [PATCH] Check names in deployer lrn --- packages/backend/src/registry.ts | 6 +++++- packages/backend/src/service.ts | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index d0a03e41..9b5d913b 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -324,7 +324,11 @@ export class Registry { paymentAddress: auctionWinner, }); - for (const record of records) { + const newRecords = records.filter(record => { + record.names !== null + }) + + for (const record of newRecords) { if (record.id) { deployerRecords.push(record); break; diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index 44e369c9..98f19476 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -911,9 +911,11 @@ export class Service { } if (deployer.minimumPayment && project.txHash) { + const amountToBePaid = deployer?.minimumPayment.replace(/\D/g, '').toString(); + const txResponse = await this.laconicRegistry.sendTokensToAccount( deployer?.paymentAddress!, - deployer?.minimumPayment + amountToBePaid ); const txHash = txResponse.transactionHash;