/** 钱包流水展示用金额：输单结算 amount 为 0（可用余额未变），用冻结差额表示亏损 */
export function txDisplayAmount(tx) {
    const type = tx.transactionType.toUpperCase();
    const amt = parseFloat(tx.amount);
    if (type === 'BET_SETTLE_LOSE' && amt === 0 && tx.frozenBefore != null && tx.frozenAfter != null) {
        const frozenDelta = parseFloat(tx.frozenBefore) - parseFloat(tx.frozenAfter);
        if (frozenDelta > 0)
            return (-frozenDelta).toString();
    }
    return tx.amount;
}
