Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
acolytec3 committed May 31, 2019
1 parent c31bc1f commit 50c1102
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions app/dashboard/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

from django.conf import settings

import ipfsapi
import ipfshttpclient
import requests
from app.utils import sync_profile
from dashboard.helpers import UnsupportedSchemaException, normalize_url, process_bounty_changes, process_bounty_details
from dashboard.models import Activity, BlockedUser, Bounty, Profile, UserAction
from eth_utils import to_checksum_address
from gas.utils import conf_time_spread, eth_usd_conv_rate, gas_advisories, recommend_min_gas_price_to_confirm_in_time
from hexbytes import HexBytes
from ipfsapi.exceptions import CommunicationError
from ipfshttpclient.exceptions import CommunicationError
from web3 import HTTPProvider, Web3, WebsocketProvider
from web3.exceptions import BadFunctionCallOutput
from web3.middleware import geth_poa_middleware
Expand Down Expand Up @@ -196,14 +196,14 @@ def get_ipfs(host=None, port=settings.IPFS_API_PORT):
communication error with IPFS.
Returns:
ipfsapi.client.Client: The IPFS connection client.
ipfshttpclient.client.Client: The IPFS connection client.
"""
if host is None:
host = f'https://{settings.IPFS_HOST}'

try:
return ipfsapi.connect(host, port)
return ipfshttpclient.connect(host, port)
except CommunicationError as e:
logger.exception(e)
raise IPFSCantConnectException('Failed while attempt to connect to IPFS')
Expand Down
4 changes: 2 additions & 2 deletions app/kudos/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from django.conf import settings

import ipfsapi
import ipfshttpclient
from dashboard.utils import get_web3
from eth_utils import to_checksum_address
from git.utils import get_emails_master
Expand Down Expand Up @@ -161,7 +161,7 @@ def __init__(self, network='localhost', sockets=False):
self._w3 = get_web3(self.network, sockets=sockets)

host = f'{settings.IPFS_API_SCHEME}://{settings.IPFS_HOST}'
self._ipfs = ipfsapi.connect(host=host, port=settings.IPFS_API_PORT)
self._ipfs = ipfshttpclient.connect(host=host, port=settings.IPFS_API_PORT)
self._contract = self._get_contract()

self.address = self._get_contract_address()
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cytoolz==0.9.0
boto==2.49.0
google-api-python-client
django-environ==0.4.5
ipfsapi
ipfshttpclient
eth-utils==1.4.1
jsondiff==1.1.1
social-auth-app-django==2.1.0
Expand Down

0 comments on commit 50c1102

Please sign in to comment.