Add type checking.
Allow pending transactions to be passed back to app