Skip to content

Commit

Permalink
No console usage in this library
Browse files Browse the repository at this point in the history
  • Loading branch information
bumi committed Mar 26, 2023
1 parent d059d03 commit 4ace4ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/webln/NostrWeblnProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class NostrWebLNProvider {
return Promise.resolve();
}
this.relay.on('connect', () => {
console.debug(`connected to ${this.relay.url}`);
//console.debug(`connected to ${this.relay.url}`);
this.connected = true;
})
await this.relay.connect();
Expand Down Expand Up @@ -115,14 +115,14 @@ export class NostrWebLNProvider {
let pub = this.relay.publish(event);

function publishTimeout() {
console.error(`Publish timeout: event ${event.id}`);
//console.error(`Publish timeout: event ${event.id}`);
reject('Publish timeout');
}
let publishTimeoutCheck = setTimeout(publishTimeout, 2000);

// @ts-ignore
pub.on('failed', (reason) => {
console.debug(`failed to publish to ${this.relay.url}: ${reason}`)
//console.debug(`failed to publish to ${this.relay.url}: ${reason}`)
clearTimeout(publishTimeoutCheck)
reject(`Failed to publish request: ${reason}`);
});
Expand All @@ -132,7 +132,7 @@ export class NostrWebLNProvider {
clearTimeout(publishTimeoutCheck);

function replyTimeout() {
console.error(`Reply timeout: event ${event.id} `);
//console.error(`Reply timeout: event ${event.id} `);
reject('reply timeout');
}
let replyTimeoutCheck = setTimeout(replyTimeout, 60000);
Expand Down

0 comments on commit 4ace4ed

Please sign in to comment.