|
|
|
@ -67,13 +67,15 @@ if ($('[data-page="address-logs"]').length) { |
|
|
|
|
addressHash: addressHash |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
$element.on('click', '[data-search-button]', (event) => { |
|
|
|
|
$element.on('click', '[data-search-button]', (_event) => { |
|
|
|
|
store.dispatch({ |
|
|
|
|
type: 'START_SEARCH', |
|
|
|
|
addressHash: addressHash |
|
|
|
|
}) |
|
|
|
|
var topic = $('[data-search-field]').val() |
|
|
|
|
var path = '/search_logs?topic=' + topic + '&address_id=' + store.getState().addressHash |
|
|
|
|
const topic = $('[data-search-field]').val() |
|
|
|
|
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' }) |
|
|
|
|
$.getJSON(path, { type: 'JSON' }) |
|
|
|
|
.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' })) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
$element.on('click', '[data-cancel-search-button]', (event) => { |
|
|
|
|
$element.on('click', '[data-cancel-search-button]', (_event) => { |
|
|
|
|
window.location.replace(window.location.href.split('?')[0]) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|