Ultimate

X_CURRENCY_INVALID

Means

a registerCurrency declaration that cannot become a currency

Typical cause

a code that is not three uppercase A–Z letters, an exponent that is not a whole number in 0…15 (MAX_MONEY_SCALE), or an empty name. Nothing is defaulted: a guessed exponent of 2 reads 1.23456789 as 1.23 and shifts every stored minor by a power of ten

Fix

registerCurrency({ code: 'XBT', exponent: 2, name: 'XBT' }) — three A–Z letters, a whole exponent from 0 to 15, and a non-empty name

Listed under i18n, money, time

This page as markdown