Merge pull request #3344 from poanetwork/vb-fix-logs-search

Fix logs search on address page
pull/3346/head
Victor Baranov 4 years ago committed by GitHub
commit c49d0269d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 10
      apps/block_scout_web/assets/js/pages/address/logs.js

@ -6,6 +6,7 @@
### Fixes
- [#3344](https://github.com/poanetwork/blockscout/pull/3344) - Fix logs search on address page
- [#3342](https://github.com/poanetwork/blockscout/pull/3342) - Fix mobile styles for contract code tab
- [#3341](https://github.com/poanetwork/blockscout/pull/3341) - Change Solc binary downloader path to official primary supported path
- [#3339](https://github.com/poanetwork/blockscout/pull/3339) - Repair websocket subscription

@ -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])
})
}

Loading…
Cancel
Save