Merge "Refactor get_tx_type and get_scan"