wazirx 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50831a494d7b1403f54eb39b75e1b4b725def789f51105a0a7187f62d9b9e6d5
4
- data.tar.gz: 8065c9e4ae429997d49a00e2a5b9774ae577e7f3dffef709742660a1275dec87
3
+ metadata.gz: 01c782f112885c2acdc69e8702285ddfba65affea3905b9d6db70418b69d6079
4
+ data.tar.gz: f22e877e2871543b3d3ac8c6ed417b7582c302f4e014be06ba9f4ec04127a178
5
5
  SHA512:
6
- metadata.gz: e83b1ccbe3b59a819a4ff312a8ab28353f6201053569f0d20f8598fa0a8e6385f7023bfd0967bf213e6af3b2fc43507046d6ce796dbb4db92b531e30ff67972a
7
- data.tar.gz: 9e05060b90bc35eb64dd5ed1506c7af7c1b9dc8cb1520f02e29c3a2fe71d9b278a523522f0a310a817d71b04bfbb51fc172f6416934b02f4e26d909463b02576
6
+ metadata.gz: b8d23e24f0020484a5f253bcf8bafd32b6dccfca0a904e96ad6da60bf39044912e69a4af15e33118608d5600450667f63baae83e9ed78406ddf8a331789724a2
7
+ data.tar.gz: d36ff416c540bc43bad33c3151459c792f49fab19fb7067ff7ec20efedac924efc59f8058a71703119bf27ba050d2df70fe733a212fe8b2454d637fea27c8435
@@ -74,16 +74,15 @@ module Wazirx
74
74
  @ws.send(JSON.dump({'event': UNSUBSCRIBE, 'streams': streams.flatten, 'id': id}))
75
75
  end
76
76
 
77
- def create_stream(streams: streams, id: id, action: action, methods: {}, auth_key:'')
78
- @ws = Faye::WebSocket::Client.new(BASE_URL)
77
+ def create_stream(streams:, id:, action:, methods: {}, auth_key: '')
78
+ @ws = Faye::WebSocket::Client.new(BASE_URL, nil)
79
79
  @ws.on :open do |event|
80
80
  puts [:open]
81
81
  if action == SUBSCRIBE
82
82
  puts subscribeEvent(streams, id, auth_key)
83
- methods[:message].call(event)
84
83
  EM.add_periodic_timer 300 do
85
- @ws.send('ping', BASE_URL)
86
- puts [:message, 'pinged every 5 minutes']
84
+ @ws.send('ping')
85
+ puts [:message, 'Pinging websocket every 5 minutes']
87
86
  end
88
87
  else
89
88
  puts unsubscribeEvent(streams, id, auth_key)
@@ -97,7 +96,6 @@ module Wazirx
97
96
 
98
97
  @ws.on :close do |event|
99
98
  puts [:close, event.code, event.reason]
100
- methods[:message].call(event)
101
99
  @ws = nil
102
100
  end
103
101
  end
@@ -1,3 +1,3 @@
1
1
  module Wazirx
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '1.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wazirx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dibyajit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-02 00:00:00.000000000 Z
11
+ date: 2022-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler