From 3cc66f4cc40bf5450a3d9812df8b56ee21edd6a5 Mon Sep 17 00:00:00 2001 From: boufni95 Date: Mon, 10 Mar 2025 22:59:04 +0000 Subject: [PATCH] deb --- src/services/storage/storageProcessor.ts | 1 - src/tests/adminChannels.spec.ts | 1 - src/tests/externalPayment.spec.ts | 2 +- src/tests/internalPayment.spec.ts | 2 +- src/tests/spamExternalPayments.spec.ts | 1 + 5 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/services/storage/storageProcessor.ts b/src/services/storage/storageProcessor.ts index a6c68573..067d3079 100644 --- a/src/services/storage/storageProcessor.ts +++ b/src/services/storage/storageProcessor.ts @@ -337,7 +337,6 @@ class StorageProcessor { private async handleFindOne(operation: FindOneOperation) { const manager = this.getManager(operation.txId); - console.log(operation.q.where) const res = await manager.getRepository(MainDbEntities[operation.entity]).findOne(operation.q) this.sendResponse({ diff --git a/src/tests/adminChannels.spec.ts b/src/tests/adminChannels.spec.ts index 819e5490..b8b48f8b 100644 --- a/src/tests/adminChannels.spec.ts +++ b/src/tests/adminChannels.spec.ts @@ -4,7 +4,6 @@ export const ignore = false export const dev = false export default async (T: TestBase) => { - T.main.storage.dbs.setDebug(true) await safelySetUserBalance(T, T.user1, 2000) await openAdminChannel(T) await runSanityCheck(T) diff --git a/src/tests/externalPayment.spec.ts b/src/tests/externalPayment.spec.ts index 23191f20..f5524ed1 100644 --- a/src/tests/externalPayment.spec.ts +++ b/src/tests/externalPayment.spec.ts @@ -36,7 +36,7 @@ const testFailedExternalPayment = async (T: TestBase) => { expect(invoice.payRequest).to.startWith("lnbcrt15u") T.d("generated 1500 sats invoice for external node") - await expectThrowsAsync(T.main.paymentManager.PayInvoice(T.user1.userId, { invoice: invoice.payRequest, amount: 0 }, application), "Error: not enough balance to decrement") + await expectThrowsAsync(T.main.paymentManager.PayInvoice(T.user1.userId, { invoice: invoice.payRequest, amount: 0 }, application), "not enough balance to decrement") T.d("payment failed as expected, with the expected error message") const u1 = await T.main.storage.userStorage.GetUser(T.user1.userId) expect(u1.balance_sats).to.be.equal(1496) diff --git a/src/tests/internalPayment.spec.ts b/src/tests/internalPayment.spec.ts index 16b410fb..7a4b3055 100644 --- a/src/tests/internalPayment.spec.ts +++ b/src/tests/internalPayment.spec.ts @@ -35,7 +35,7 @@ const testFailedInternalPayment = async (T: TestBase) => { const invoice = await T.main.paymentManager.NewInvoice(T.user2.userId, { amountSats: 1000, memo: "test" }, { linkedApplication: application, expiry: defaultInvoiceExpiry }) expect(invoice.invoice).to.startWith("lnbcrt10u") T.d("generated 1000 sats invoice for user2") - await expectThrowsAsync(T.main.paymentManager.PayInvoice(T.user1.userId, { invoice: invoice.invoice, amount: 0 }, application), "Error: not enough balance to decrement") + await expectThrowsAsync(T.main.paymentManager.PayInvoice(T.user1.userId, { invoice: invoice.invoice, amount: 0 }, application), "not enough balance to decrement") T.d("payment failed as expected, with the expected error message") } diff --git a/src/tests/spamExternalPayments.spec.ts b/src/tests/spamExternalPayments.spec.ts index a5861542..9380f5f7 100644 --- a/src/tests/spamExternalPayments.spec.ts +++ b/src/tests/spamExternalPayments.spec.ts @@ -27,6 +27,7 @@ const testSpamExternalPayment = async (T: TestBase) => { const successfulPayments = res.filter(r => r.success) const failedPayments = res.filter(r => !r.success) + console.log(failedPayments) failedPayments.forEach(f => expect(f.err).to.be.equal("Error: not enough balance to decrement")) successfulPayments.forEach(s => expect(s.result).to.contain({ amount_paid: 500, network_fee: 1, service_fee: 3 })) expect(successfulPayments.length).to.be.equal(3)