Skip to content

fix: preserve fractional block volume - #12

Open
nvphungdev wants to merge 1 commit into
Sevault:masterfrom
nvphungdev:fix/block-volume-display
Open

fix: preserve fractional block volume#12
nvphungdev wants to merge 1 commit into
Sevault:masterfrom
nvphungdev:fix/block-volume-display

Conversation

@nvphungdev

Copy link
Copy Markdown

Summary

  • keep block-list volume as a Decimal value after converting from satoshis to BGL
  • use the normal currency display path so sub-1-BGL values do not render as 0 in the table

Why

The block list was converting total_out + subsidy from satoshis to BGL and then applying parseInt, followed by a zero-decimal BGL formatter. Current Bitgesell block amounts can be below 1 BGL, so valid blockstats values were displayed as 0.

Closes #11

Validation

  • npm test
  • rendered views/includes/blocks-list.pug with mocked blockstats where subsidy is 596 sats and confirmed the volume cell renders fractional BGL instead of 0
  • git diff --check

Note: npm run lint still reports existing unrelated errors across app/ and routes/; this PR only changes the Pug block-list template.

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.

fix: fix incosnistent volume display

1 participant