export function hasBalance(balanceData) {
    return !!balanceData && balanceData.balance !== undefined && balanceData.balance.gt(0);
}
export function compareByBalanceThenFiat(a, b) {
    const ah = hasBalance(a);
    const bh = hasBalance(b);
    if (ah && !bh)
        return -1;
    if (!ah && bh)
        return 1;
    const aFiat = a?.fiatValue ?? 0;
    const bFiat = b?.fiatValue ?? 0;
    return bFiat - aFiat;
}
//# sourceMappingURL=sortByBalance.js.map