diff --git a/src/services/main/liquidityProvider.ts b/src/services/main/liquidityProvider.ts index 54b860aa..e34499a4 100644 --- a/src/services/main/liquidityProvider.ts +++ b/src/services/main/liquidityProvider.ts @@ -39,6 +39,7 @@ export class LiquidityProvider { lastSeenBeacon = 0 latestReceivedBalance = 0 incrementProviderBalance: (balance: number) => Promise + rand = Math.random() // make the sub process accept client constructor(getSettings: () => LiquiditySettings, utils: Utils, invoicePaidCb: InvoicePaidCb, incrementProviderBalance: (balance: number) => Promise) { this.utils = utils @@ -327,7 +328,7 @@ export class LiquidityProvider { } setNostrInfo = ({ clientId, myPub }: { myPub: string, clientId: string }) => { - this.log("setting nostr info") + this.log("setting nostr info", this.rand) this.clientId = clientId this.myPub = myPub this.setSetIfConfigured() @@ -336,7 +337,7 @@ export class LiquidityProvider { attachNostrSend(f: NostrSend) { - this.log("attaching nostrSend action") + this.log("attaching nostrSend action", this.rand) this.nostrSend = f this.setSetIfConfigured() } @@ -344,7 +345,7 @@ export class LiquidityProvider { setSetIfConfigured = () => { if (this.nostrSend && !!this.pubDestination && !!this.clientId && !!this.myPub) { this.configured = true - this.log("configured to send to ", this.pubDestination) + this.log("configured to send to ", this.pubDestination, this.rand) } } // fees: { networkFeeBps: number, networkFeeFixed: number, serviceFeeBps: number } diff --git a/src/tests/setupBootstrapped.ts b/src/tests/setupBootstrapped.ts index dfcf16c7..9ea29d91 100644 --- a/src/tests/setupBootstrapped.ts +++ b/src/tests/setupBootstrapped.ts @@ -46,6 +46,7 @@ export const initBootstrappedInstance = async (T: TestBase) => { await new Promise(res => { const interval = setInterval(async () => { const canHandle = await bootstrapped.liquidityProvider.CanProviderHandle({ action: 'receive', amount: 2000 }) + console.log("can handle", canHandle) if (canHandle) { clearInterval(interval) res()