text: import axios from 'axios';
  import service from 'opportunity-service';
  import { connect } from 'react-redux';
  import connector from '../../Connector';
  import { createRelationship as createRelationshipService } from '../../redux/relationship/actions'
  
  async function createRelationship(relationshipData) {
      const { taskName, taskMarket, taskBounty, taskDescription, taskDefinitionOfDone, 
          taskMinWorkerReputation, taskMinWorkerIndustryReputation, taskMetadataPointer } = relationshipData;
  
      const data = JSON.stringify({
          taskName,
          taskMarket,
          taskBounty,
          taskMetadataPointer,
          taskDescription,
          taskDefinitionOfDone,
          taskMinWorkerReputation,
          taskMinWorkerIndustryReputation,
          taskOwner: connector.getCurrentAccount(),
      });
  
      service.api.exchange.createTask(data)
      .then(() => {
          console.log('Request for creating relationship finished.')
      })
      .catch(error => {
          console.log('Error creating relationship: ' + error)
      })
  }
  
  export default createRelationship;