Refactor - should return deferred promise when processing transaction