diff options
| author | Adam Soltys <[email protected]> | 2013-03-31 10:34:06 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2013-03-31 10:34:06 -0700 |
| commit | 91d2cf854f32acfb6fe434cf4a68ba6e6c04c1b2 (patch) | |
| tree | 2f54801a2fa89e210c6c5f918edb8855fd8e801d /public | |
| parent | 67286cd82b74de53e36787b644f9c9c7e2a21134 (diff) | |
| download | coinos-server-91d2cf854f32acfb6fe434cf4a68ba6e6c04c1b2.tar.gz coinos-server-91d2cf854f32acfb6fe434cf4a68ba6e6c04c1b2.zip | |
Fix QR code and websocket issues
Diffstat (limited to 'public')
| -rw-r--r-- | public/js/calculator.coffee | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee index 6c68ae85..82829628 100644 --- a/public/js/calculator.coffee +++ b/public/js/calculator.coffee @@ -106,14 +106,17 @@ setupSocket = -> setTimeout(setupSocket, 10000) unless g.websocket and g.websocket.readyState is 1 - g.websocket = new WebSocket("ws://ws.blockchain.info:8335/inv") + g.websocket = new WebSocket("ws://ws.blockchain.info/inv") g.websocket.onopen = -> g.websocket.send('{"op":"addr_sub", "addr":"' + g.address + '"}') - g.websocket.onerror = g.websocket.onclose = -> + g.websocket.onerror = -> fail(SOCKET_FAIL) + g.websocket.onclose = -> + setupSocket() + g.websocket.onmessage = (e) -> results = eval('(' + e.data + ')') from_address = '' @@ -153,7 +156,8 @@ updateTotal = -> total = '' $('#total').html(total.toString()) - new QRCode('qr', "bitcoin: #{g.address}?amount=#{total.toString()}") + $('#qr').html('') + new QRCode('qr', "bitcoin:#{g.address}?amount=#{total.toString()}") fail = (msg) -> g.errors.push(msg) |
