Fix all static analysis problems in transaction.js