Added list sorting when creating transactions