Update balance and sort transactions by timestamp