Remove delay adding validated transaction if pending transactions are hidden

Co-authored-by: Stamates <stamates@hotmail.com>
pull/949/head
jimmay5469 6 years ago committed by Stamates
parent 914a6fe8b7
commit c097f7e485
  1. 20
      apps/block_scout_web/assets/js/pages/address.js

@ -226,14 +226,20 @@ if ($addressDetailsPage.length) {
newlyValidatedTransactions.forEach(({ transactionHash, transactionHtml }) => {
let $transaction = $(`[data-selector="pending-transactions-list"] [data-transaction-hash="${transactionHash}"]`)
$transaction.html($(transactionHtml).html())
setTimeout(() => {
$transaction.addClass('shrink-out')
if ($transaction.is(':visible')) {
setTimeout(() => {
clingBottom()
$transaction.slideUp({ complete: () => $transaction.remove() })
slideDownPrepend($transactionsList, transactionHtml)
}, 400)
}, 1000)
$transaction.addClass('shrink-out')
setTimeout(() => {
clingBottom()
$transaction.slideUp({ complete: () => $transaction.remove() })
slideDownPrepend($transactionsList, transactionHtml)
}, 400)
}, 1000)
} else {
clingBottom()
$transaction.remove()
slideDownPrepend($transactionsList, transactionHtml)
}
})
updateAllAges()
}

Loading…
Cancel
Save