Open blakebyrnes opened 1 month ago
Hey @blakebyrnes Could you please give more context?
Thanks
@piggydoughnut, FixedU128, FixedU64, etc represent decimal numbers using fixed points, but when you edit them in extrinsic creations (or view them in the storage), they show up as full u128 values. For instance, these are prices from the Argon Testnet (Storage -> priceIndex -> current()
)
{
btcUsdPrice: 65,926,754,199,999,998,853,120
argonUsdPrice: 1,000,000,000,000,000,000
argonUsdTargetPrice: 1,002,545,194,941,447,002
tick: 8,182
}
The BTC usd price is 65,926.754...
. In an ideal world, the decimal place would be visible here. And while editing, you would be able to input a variable with optional decimal precision. Below is what fixed numbers show in the extrinsic ui. As you can see, if you're just hoping to enter a percentage, this can make the it very hard to know what to input.
It would be really helpful to be able to view fixed point numbers (and edit them) with the actual numbers they represent. Are you open to adding additional common substrate primitives to the ui?