Canton dApp Booster
    Preparing search index...
    • Checks an amount against the token's precision, the Numeric 38,10 ceiling, and an optional range. Returns undefined when nothing is wrong, including for the empty string: empty is empty, and required-ness belongs to the form. A max that is not itself a decimal returns invalid-max rather than reading as no ceiling, so a malformed balance cannot silently uncap the amount.

      Parameters

      • value: string
      • __namedParameters: { max?: string; precision?: number } = {}

      Returns TokenAmountError | undefined

      validateAmount('1.5000000001', { max: '1.5' }) // 'above-max'