Updated transaction.equals method