Thrown by Demos.transfer (and friends) when a caller passes an OS
amount with sub-DEM precision against a node that has not yet
activated the osDenomination fork. The pre-fork wire shape is a JS
number in DEM, which cannot represent sub-DEM precision; sending
the transaction would silently truncate the user's funds. This guard
fails fast at the public-API boundary before any signing happens.
Example
try { awaitdemos.transfer(to, 1_234_567n) // sub-DEM precision } catch (err) { if (errinstanceofSubDemPrecisionError) { // tell the user to round, or to upgrade the node } }
Thrown by
Demos.transfer(and friends) when a caller passes an OS amount with sub-DEM precision against a node that has not yet activated theosDenominationfork. The pre-fork wire shape is a JSnumberin DEM, which cannot represent sub-DEM precision; sending the transaction would silently truncate the user's funds. This guard fails fast at the public-API boundary before any signing happens.Example