Concordium / concordium-scan

CCDScan
Apache License 2.0
3 stars 14 forks source link

Show the number of digits and align numbers to the right #62

Closed mh-concordium closed 9 months ago

mh-concordium commented 1 year ago

Looking at the tokens of an account, balance amounts are not show with decimal points and numbers are not aligned to the right.

Follow the link below:

https://testnet.ccdscan.io/?dcount=1&dentity=account&daddress=36Z8i8wkGbA2tKmrRgXrofvbTbV68KCfJD1nAVSMYJJBKPo7mw

image.png

SRConcordium commented 1 year ago

The issue is not completed fixed in Stagenet, observed couple of issues - https://stagenet.ccdscan.io/accounts?dcount=1&dentity=account&daddress=4sH15AxjthA9DYhCux3aVUtPMemD1oJCL4WFiUXcJKqAeeQ9oc
1) Decimal points are still missing from the balance values and 2) Amount is right aligned but header text "Balance" is not aligned above the values, heading should be right above the values. Refer screenshot below - image

parv0888 commented 1 year ago

@SRConcordium The decimals that need to be shown on the UI are fetched from the Tokens Metadata URL. If the Metadata URL is not valid then the decimals cannot be shown. Which is the case here since the metadata url is https://some.example/token/FF16A0F62F17E96C274DB1343EE6A236756D87AB8A88C7989A1CBE90D030A3F4

abizjak commented 1 year ago

@parv0888 I agree that this is the correct fallback. The issue with the balance location is a valid one, so that should be fixed.

SRConcordium commented 1 year ago

Decimal representation for the tokens are shown OK as verified in Testnet CCDScan for account address, 45Dp7jhi7kmQbapb7LHnDju1y4R3u4YXYusPBcw8cmZw7MgTeU with contract indexes - 3501, 3497 and 3504 (refer attached screenshot). The header misalignment issue is still need fixing. image

parv0888 commented 1 year ago

@parv0888 I agree that this is the correct fallback. The issue with the balance location is a valid one, so that should be fixed.

Raised PR for the comment https://github.com/Concordium/concordium-scan/pull/79

image

SRConcordium commented 1 year ago

Verified in Testnet, the header text is right aligned now - image

ghost commented 9 months ago

Verified mainnet