Skip to content

Commit

Permalink
Revert "Revert "Use env variables""
Browse files Browse the repository at this point in the history
This reverts commit de385dd.
  • Loading branch information
posix4e committed Jun 20, 2020
1 parent d66f466 commit 557b6a9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hmt_escrow/eth_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
KVSTORE_CONTRACT = Web3.toChecksumAddress(
os.getenv("KVSTORE_CONTRACT",
"0xbcF8274FAb0cbeD0099B2cAFe862035a6217Bf44"))
WEB3_POLL_LATENCY = os.getenv("WEB3_POLL_LATENCY", 5)
WEB3_POLL_LATENCY = float(os.getenv("WEB3_POLL_LATENCY", 5))
WEB3_TIMEOUT = int(os.getenv("WEB3_TIMEOUT", 240))


def get_w3() -> Web3:
Expand Down Expand Up @@ -112,10 +113,8 @@ def handle_transaction(txn_func, *args, **kwargs) -> AttributeDict:
txn_hash = w3.eth.sendRawTransaction(signed_txn.rawTransaction)

try:
txn_receipt = wait_for_transaction_receipt(w3,
txn_hash,
timeout=240,
poll_latency=5)
txn_receipt = wait_for_transaction_receipt(
w3, txn_hash, timeout=WEB3_TIMEOUT, poll_latency=WEB3_POLL_LATENCY)
except TimeoutError as e:
raise e
return txn_receipt
Expand Down

0 comments on commit 557b6a9

Please sign in to comment.