Skip to content

Commit

Permalink
remove pws.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Jan 16, 2021
1 parent 0be9c40 commit 63259eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nostr-tools",
"version": "0.1.4",
"version": "0.2.0",
"description": "Tools for making a Nostr client.",
"main": "index.js",
"repository": {
Expand All @@ -9,8 +9,7 @@
},
"dependencies": {
"buffer": "^6.0.3",
"noble-secp256k1": "^1.1.1",
"pws": "^5.0.2"
"noble-secp256k1": "^1.1.1"
},
"keywords": [
"decentralization",
Expand Down
3 changes: 1 addition & 2 deletions relay.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import PersistentWebSocket from 'pws'
import {verifySignature} from './event'

export function normalizeRelayURL(url) {
Expand All @@ -12,7 +11,7 @@ export function normalizeRelayURL(url) {
export function relayConnect(url, onEvent, onNotice) {
url = normalizeRelayURL(url)

const ws = new PersistentWebSocket(
const ws = new WebSocket(
url + (url.indexOf('?') !== -1 ? '&' : '?') + `session=${Math.random()}`,
{
pingTimeout: 180 * 1000
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1165,11 +1165,6 @@ picomatch@^2.2.2:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==

pws@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/pws/-/pws-5.0.2.tgz#86b581ad5e811417d514f06868ae4d9c71bdaa48"
integrity sha512-V4ZwsJIAiG9YoNv1IO/JSoapG9NrwRhmKKdQ0C7q0tBIxBTptGeTBhdnE53o5qrcoEHDqw5Mc3T1XF0NlvHTlQ==

randombytes@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
Expand Down

0 comments on commit 63259eb

Please sign in to comment.