Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force to show address view for checksummed address even if it is not in DB #2425

Merged
merged 9 commits into from
Jul 29, 2019

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Jul 24, 2019

Related issue https://forum.poa.network/t/blockscout-doesnt-show-address-info/2843

Motivation

In the described in the link above case, a developer uses a link to Blockscout address page and if there were no transactions with this address, we show 404 page, but instead, I think we should display an address view, if this address is checksummed.

The possible use case can be if the user sends a transaction from a dapp/wallet to an address, which never has in/out transactions in the blockchain and w/out waiting of confirmation goes to Blockscout to see the balance update. To show address view with a zero balance is less confusing than to display 404 page.

Changelog

Enhancements

8dc5f00 - Address view for checksummed address is allowed
1c67e56 - Hide Last Balance Update in address view if there is no fetched_coinbalance_block_number, because, I suppose, we don't want to trigger on-demand balance update if the address has no transactions yet

Bug Fixes

a789586 - chore, fixing of expected action/2 to return a Plug.Conn, all plugs must receive a connection (conn) and return a connection, got: {:error, :not_found} error when opening page like http://localhost:4000/address/{address_hahs}/coin_balances with inexisting address. This related error was detected while working on this PR.

Checklist for your PR

  • I added an entry to CHANGELOG.md with this PR
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • I checked whether I should update the docs and did so if necessary

@vbaranov vbaranov requested review from ayrat555, pasqu4le, saneery and Heimdell and removed request for ayrat555 July 24, 2019 16:53
@vbaranov vbaranov self-assigned this Jul 24, 2019
@vbaranov vbaranov added the ready for review This PR is ready for reviews. label Jul 24, 2019
@coveralls
Copy link

coveralls commented Jul 24, 2019

Pull Request Test Coverage Report for Build a7eccdb5-57b5-475f-8c5c-cfaf298f9b08

  • 2 of 11 (18.18%) changed or added relevant lines in 2 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 79.289%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/block_scout_web/lib/block_scout_web/controllers/address_coin_balance_controller.ex 0 2 0.0%
apps/block_scout_web/lib/block_scout_web/controllers/address_transaction_controller.ex 2 9 22.22%
Files with Coverage Reduction New Missed Lines %
apps/block_scout_web/lib/block_scout_web/controllers/chain/market_history_chart_controller.ex 2 71.43%
Totals Coverage Status
Change from base Build 91a900db-612f-42a8-b953-ce8e031ea189: -0.1%
Covered Lines: 5149
Relevant Lines: 6494

💛 - Coveralls

@vbaranov vbaranov merged commit 51eaa28 into master Jul 29, 2019
@vbaranov vbaranov deleted the vb-force-show-not-found-address branch July 29, 2019 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR is ready for reviews.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants