Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Show data from DB #28

Closed
wants to merge 57 commits into from
Closed

Show data from DB #28

wants to merge 57 commits into from

Conversation

fkrause98
Copy link
Contributor

@fkrause98 fkrause98 commented Jul 10, 2023

Changes:

  • Make the following pages use DB data (not everything is coming from the DB right now, however):
  1. Block Index.
  2. Block Detail.
  3. Transaction Detail.
  4. Transaction Index
  5. Index
  • Add "seeds" for development.

How to test:

  • Run the db dump with make seed and check the details and index pages.

@fkrause98 fkrause98 changed the title Show db data Fetch Transaction Receipts Jul 10, 2023
@fkrause98 fkrause98 changed the title Fetch Transaction Receipts Show data from DB Jul 10, 2023
@fkrause98 fkrause98 mentioned this pull request Jul 11, 2023
@fkrause98 fkrause98 marked this pull request as draft July 11, 2023 20:36
@fkrause98 fkrause98 marked this pull request as ready for review July 11, 2023 20:50
Base automatically changed from store-tx-receipts to main July 11, 2023 21:27
@@ -171,10 +171,12 @@ defmodule StarknetExplorerWeb.HomeLive.Index do

@impl true
def handle_info(:load_blocks, socket) do
[latest_block | blocks] = Block.latest_n_blocks_with_txs(15)
Copy link
Member

@jrchatruc jrchatruc Jul 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we should do something like

blocks = Block.latest_n_blocks_with_txs(15)
latest_block = List.first(blocks)

Otherwise the Html will render 14 blocks instead of 15 because the first one won't be included in the blocks list anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fkrause98 fkrause98 marked this pull request as draft July 12, 2023 15:14
@fkrause98 fkrause98 marked this pull request as ready for review July 12, 2023 17:06
@fkrause98 fkrause98 marked this pull request as draft August 22, 2023 21:58
@fkrause98
Copy link
Contributor Author

Closing this in favor of #104

@fkrause98 fkrause98 closed this Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants