penumbra icon indicating copy to clipboard operation
penumbra copied to clipboard

test: correctly display denom unit values with round-trip

Open aubrika opened this issue 6 months ago • 0 comments

This bugfix (linked below) needs a unit test.

It can be triggered by having a Metadata object where the list of units is not sorted. The previous code is incorrect on, for instance, the USDC Metadata currently in the Prax registry. That JSON object could be copied into a unit test, which can create a value like "1.234 USDC", parse it, and check that displaying it round trips (because the correct unit is selected).

Originally posted by @hdevalence in https://github.com/penumbra-zone/penumbra/pull/4801#discussion_r1714017078

aubrika avatar Aug 12 '24 16:08 aubrika