Skip to content

Commit

Permalink
dss
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelSyntronic committed Mar 17, 2024
1 parent 4816399 commit 7317e9b
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions client/TurboBot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,30 +112,30 @@ export class TurboBot {
isCheckingPool = false
})

const ws = new WebSocket(config.rpcWsURL)
ws.onopen = () => {
ws.send(
JSON.stringify({
"jsonrpc": "2.0",
"id": 1,
"method": "logsSubscribe",
"params": ["all"]
}
)
)

ws.onmessage = (evt) => {
try {
console.log(`New logs from WS: ${evt.data.toString()}`)
} catch (e) {
console.log(e)
}
}
}
ws.onerror = (e) => {
console.log(`WS error1: ${e.error.errors[0]}`)
console.log(`WS error2: ${e.error.errors[1]}`)
}
// const ws = new WebSocket(config.rpcWsURL)
// ws.onopen = () => {
// ws.send(
// JSON.stringify({
// "jsonrpc": "2.0",
// "id": 1,
// "method": "logsSubscribe",
// "params": ["all"]
// }
// )
// )

// ws.onmessage = (evt) => {
// try {
// console.log(`New logs from WS: ${evt.data.toString()}`)
// } catch (e) {
// console.log(e)
// }
// }
// }
// ws.onerror = (e) => {
// console.log(`WS error1: ${e.error.errors[0]}`)
// console.log(`WS error2: ${e.error.errors[1]}`)
// }
})
}

Expand Down

0 comments on commit 7317e9b

Please sign in to comment.