refactor on transaction detail handling