[TASK] consolidate transaction logic