btc-rpc-explorer icon indicating copy to clipboard operation
btc-rpc-explorer copied to clipboard

Always show 0/4/8 decimal places on BTC amounts

Open CeruleanRat opened this issue 2 years ago • 0 comments

I got confused looking at the balance of a transaction because the eight decimal place was a 0 and wasn't shown, and I was assuming all eight were being shown so the amount seemed to be off by a factor of ten.

There's an example of this on https://bitcoinexplorer.org/tx/d90bfda13e6599cf595f3f43476074d717b6e166821e5ff22bfe4823ec113c63, where the 0th output shows a value of 0.0032015 BTC with seven decimal places. It also right-aligns so its seventh decimal place is in the same position as the eight decimal place on the numbers below it.

I think it would be neater to always use 0/4/8 (or maybe 0/2/4/8) decimal places for BTC amounts to make them easier to read consistently. For example:

3.1        shows as 3.10 or 3.1000
3.14       shows as 3.14 or 3.1400
3.141      shows as 3.1410
3.1415     shows as 3.1415
3.14159    shows as 3.14159000
3.141592   shows as 3.14159200
3.1415926  shows as 3.14159260
3.14159265 shows as 3.14159265

CeruleanRat avatar May 06 '22 14:05 CeruleanRat