Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/quietgarden/elm-web3-ui is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with tag 2.0.0 found (1 same-name repos checked); no cached copy. Use another version.
Token price display with automatic notation selection.
Bonding curve prices span many orders of magnitude. This module picks the most readable notation automatically so each project does not reimplement the same range-checking logic.
Web3.Ui.PriceDisplay.view []
{ decimals = 18, symbol = "PLS" }
priceWei
Web3.Ui.PriceDisplay.format 18 priceWei
--> "0.00042" (fixed for normal range)
--> "1.23M" (SI suffix for large)
--> "4.56e-10" (scientific for tiny)Format a price BigInt as a human-readable string. No symbol appended.
See view for notation selection rules.
Display a token price, automatically selecting notation.
Notation rules:
1.23M,45.6K)1.23,0.456,0.00123)4.56e-10)CSS class:
web3-price