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

v2: Last 10 ledgers info #237

Merged
merged 1 commit into from
Feb 16, 2022
Merged

v2: Last 10 ledgers info #237

merged 1 commit into from
Feb 16, 2022

Conversation

quietbits
Copy link
Contributor

@quietbits quietbits commented Feb 15, 2022

  • Moved LedgerClosedTime to a separate component

image

@stellar-jenkins
Copy link

Preview deployed to development environment: https://dashboard.prototypes.kube001.services.stellar-ops.com

@quietbits quietbits linked an issue Feb 15, 2022 that may be closed by this pull request
@@ -102,6 +102,11 @@ export const startLedgerStreamingAction = createAsyncThunk<
.stream({
onmessage: (ledger: LedgerRecord) => {
const { lastLedgerRecords } = ledgersSelector(getState());

if (!lastLedgerRecords[0]) {

Choose a reason for hiding this comment

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

just curious: is it possible for this array to have a length but have no record (or null) at index 0? I'm assuming no

Choose a reason for hiding this comment

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

mainly wondering why you chose to check for this instead of lastLedgerRecords.length

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, we could be checking just for the array length here, but I went with the lastLedgerRecords[0] because it's used below in lastLedgerRecords[0].closedAt. Do you think it would more clear to check for the array length?

@quietbits quietbits merged commit eb96b1c into dashboard-v2 Feb 16, 2022
@quietbits quietbits deleted the v2-last-10-ledgers branch February 16, 2022 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Last 10 ledgers info
3 participants