laboratory icon indicating copy to clipboard operation
laboratory copied to clipboard

inconsistent rendering of amounts in xdr viewer

Open MonsieurNicolas opened this issue 8 years ago • 3 comments

Amounts are returned with what seems to be an arbitrary form.

An amount value is returned as either a raw value or both fixed point and raw

Examples:

a trustline will show up with fields (right next to each other):

  • balance: 337698512325 this is the raw value
  • limit: 100000000000 (raw: 1000000000000000000) both are returned

Lumens are returned the same way, for example in AccountEntry, you can see balance: 105032704 this is raw but in offers and payments it's the fixed point.

In general, I would imagine that any int64 that is supposed to be an amount should be rendered the same way.

MonsieurNicolas avatar Oct 21 '17 00:10 MonsieurNicolas

Is this still an issue? An XDR to reproduce would be helpful, I'm not quite sure what I'm looking for.

vcarl avatar Oct 25 '19 21:10 vcarl

yes, you can look at this example

Account and Trustline have balance in raw only, like balance: 487864711 Offer amount and Trustline limit are mixed.

Looks like right now the only gap is on balance so rendering it as mixed would probably fix this issue

MonsieurNicolas avatar Oct 25 '19 23:10 MonsieurNicolas

Would be great to create type Amount int64 type in stellar-core so finding fields that should be rendered as amounts would be easier.

bartekn avatar Oct 28 '19 11:10 bartekn