|
|
@ -67,13 +67,15 @@ if ($('[data-page="address-logs"]').length) { |
|
|
|
addressHash: addressHash |
|
|
|
addressHash: addressHash |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$element.on('click', '[data-search-button]', (event) => { |
|
|
|
$element.on('click', '[data-search-button]', (_event) => { |
|
|
|
store.dispatch({ |
|
|
|
store.dispatch({ |
|
|
|
type: 'START_SEARCH', |
|
|
|
type: 'START_SEARCH', |
|
|
|
addressHash: addressHash |
|
|
|
addressHash: addressHash |
|
|
|
}) |
|
|
|
}) |
|
|
|
var topic = $('[data-search-field]').val() |
|
|
|
const topic = $('[data-search-field]').val() |
|
|
|
var path = '/search_logs?topic=' + topic + '&address_id=' + store.getState().addressHash |
|
|
|
const addressHashPlain = store.getState().addressHash |
|
|
|
|
|
|
|
const addressHashChecksum = addressHashPlain && window.web3.toChecksumAddress(addressHashPlain) |
|
|
|
|
|
|
|
const path = '/search-logs?topic=' + topic + '&address_id=' + addressHashChecksum |
|
|
|
store.dispatch({ type: 'START_REQUEST' }) |
|
|
|
store.dispatch({ type: 'START_REQUEST' }) |
|
|
|
$.getJSON(path, { type: 'JSON' }) |
|
|
|
$.getJSON(path, { type: 'JSON' }) |
|
|
|
.done(response => store.dispatch(Object.assign({ type: 'ITEMS_FETCHED' }, humps.camelizeKeys(response)))) |
|
|
|
.done(response => store.dispatch(Object.assign({ type: 'ITEMS_FETCHED' }, humps.camelizeKeys(response)))) |
|
|
@ -81,7 +83,7 @@ if ($('[data-page="address-logs"]').length) { |
|
|
|
.always(() => store.dispatch({ type: 'FINISH_REQUEST' })) |
|
|
|
.always(() => store.dispatch({ type: 'FINISH_REQUEST' })) |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
$element.on('click', '[data-cancel-search-button]', (event) => { |
|
|
|
$element.on('click', '[data-cancel-search-button]', (_event) => { |
|
|
|
window.location.replace(window.location.href.split('?')[0]) |
|
|
|
window.location.replace(window.location.href.split('?')[0]) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|