|
|
@ -1,4 +1,5 @@ |
|
|
|
import $ from 'jquery' |
|
|
|
import $ from 'jquery' |
|
|
|
|
|
|
|
import URI from 'urijs' |
|
|
|
import socket from '../socket' |
|
|
|
import socket from '../socket' |
|
|
|
|
|
|
|
|
|
|
|
if (window.page === 'address') { |
|
|
|
if (window.page === 'address') { |
|
|
@ -7,17 +8,20 @@ if (window.page === 'address') { |
|
|
|
.receive('ok', resp => { console.log('Joined successfully', `addresses:${window.addressHash}`, resp) }) |
|
|
|
.receive('ok', resp => { console.log('Joined successfully', `addresses:${window.addressHash}`, resp) }) |
|
|
|
.receive('error', resp => { console.log('Unable to join', `addresses:${window.addressHash}`, resp) }) |
|
|
|
.receive('error', resp => { console.log('Unable to join', `addresses:${window.addressHash}`, resp) }) |
|
|
|
|
|
|
|
|
|
|
|
const $emptyTransactionsList = $('[data-selector="empty-transactions-list"]') |
|
|
|
const currentLocation = URI(window.location) |
|
|
|
if ($emptyTransactionsList) { |
|
|
|
if(!currentLocation.hasQuery('block_number')) { |
|
|
|
channel.on('transaction', () => { |
|
|
|
const $emptyTransactionsList = $('[data-selector="empty-transactions-list"]') |
|
|
|
window.location.reload() |
|
|
|
if ($emptyTransactionsList) { |
|
|
|
}) |
|
|
|
channel.on('transaction', () => { |
|
|
|
} |
|
|
|
window.location.reload() |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const $transactionsList = $('[data-selector="transactions-list"]') |
|
|
|
const $transactionsList = $('[data-selector="transactions-list"]') |
|
|
|
if ($transactionsList) { |
|
|
|
if ($transactionsList) { |
|
|
|
channel.on('transaction', (msg) => { |
|
|
|
channel.on('transaction', (msg) => { |
|
|
|
$transactionsList.prepend(msg.transaction) |
|
|
|
$transactionsList.prepend(msg.transaction) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|