Skip to content

@swapped/connect-sdk / core / validateAmountInput

Function: validateAmountInput() ​

validateAmountInput(__namedParameters): AmountValidationError | null

Defined in: src/modules/amount-input/amount-input.utils.ts:144

Validate a parsed amount against optional min / balance / spendable bounds.

Precedence: invalid_amount → amount_zero → below_min → above_balance → above_spendable. NaN and ±Infinity are invalid_amount. Returns null when the amount is valid.

Parameters ​

__namedParameters ​

ValidateAmountInputInput

Returns ​

AmountValidationError | null