Skip to main content

bridge/functions/compareAmounts.md

compareAmounts(a, b): -1 | 0 | 1

Compare two token amounts

Parameters​

ParameterTypeDescription
astringFirst amount
bstringSecond amount

Returns​

-1 | 0 | 1

-1 if a < b, 0 if a == b, 1 if a > b