graphprotocol / mission-control-indexer

Technical indexer documentation and infrastructure templates for the Mission Control testnet
21 stars 4 forks source link

Explorer - incorrect funds representation #232

Open koen84 opened 3 years ago

koen84 commented 3 years ago

image

We got 5M GRT <> i have 190M available ? I have 2M staked in protocol <> i have 10M allocated ?

trader-payne commented 3 years ago

Duplicate of https://github.com/graphprotocol/mission-control-indexer/issues/220 Related to EU Locale. Needs to enforce US locale for this to be avoided. SoonTM.

koen84 commented 3 years ago

Internationalization support in programming languages is getting better, alternative to forcing a locale is to display it in a way that uses the locale of the browser which is often done by not specifying the locale.

koen84 commented 3 years ago

I hope it's okay to link, this is how i solved it on a blockexplorer in npm. https://github.com/koen84/hash-explorer/commit/e301d1e8b05f7d3f29855c169751d730d3f2fe40 The undefined is key to letting the number be displayed in the browser's locale (and what i meant by "not specifying the locale").

nenadjaja commented 3 years ago

Thanks @koen84 I'll look into that. Yeah we don't specify the locale, not sure why is it showing incorrectly

koen84 commented 3 years ago

@nenadjaja i spent quite a bit of time back when to figure that particular fix out, i hope it helps.

Just to point out, the "total" value IS displayed correctly, which is extra strange ?

nenadjaja commented 3 years ago

Thanks, it might help :) This is what I see on my screen, and I agree - Total is correct which is very strange

Screen Shot 2020-12-01 at 6 38 11 PM