Merge pull request #4419 from blockscout/vb-search-contracts-order

Order contracts in the search by inserted_at in descending order
pull/4418/head
Victor Baranov 3 years ago committed by GitHub
commit b5f952e233
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 3
      apps/explorer/lib/explorer/chain.ex

@ -5,6 +5,7 @@
- [#4353](https://github.com/blockscout/blockscout/pull/4353) - Added live-reload on the token holders page
### Fixes
- [#4419](https://github.com/blockscout/blockscout/pull/4419) - Order contracts in the search by inserted_at in descending order
- [#4406](https://github.com/blockscout/blockscout/pull/4406) - Fix internal server error on the validator's txs page
- [#4360](https://github.com/blockscout/blockscout/pull/4360) - Fix false-pending transactions in reorg blocks
- [#4388](https://github.com/blockscout/blockscout/pull/4388) - Fix internal server error on contract page for insctances without sourcify envs

@ -1131,7 +1131,8 @@ defmodule Explorer.Chain do
query =
from(smart_contract in SmartContract,
where: fragment("to_tsvector('english', name ) @@ to_tsquery(?)", ^term),
select: %{contract_address_hash: smart_contract.address_hash, name: smart_contract.name}
select: %{contract_address_hash: smart_contract.address_hash, name: smart_contract.name},
order_by: [desc: smart_contract.inserted_at]
)
Repo.all(query)

Loading…
Cancel
Save