Skip to content

Commit eecc240

Browse files
committed
fix: fixed typing issues
1 parent fd097b2 commit eecc240

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

‎tests/test_uniswap.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def get_exchange_rate(
220220
def test_add_liquidity(self, client: Uniswap, web3: Web3, token, max_eth):
221221
r = client.add_liquidity(token, max_eth)
222222
tx = web3.eth.wait_for_transaction_receipt(r, timeout=6000)
223-
assert tx.status
223+
assert tx["status"]
224224

225225
@pytest.mark.skip
226226
@pytest.mark.parametrize(
@@ -237,7 +237,7 @@ def test_remove_liquidity(
237237
with expectation:
238238
r = client.remove_liquidity(token, max_token)
239239
tx = web3.eth.wait_for_transaction_receipt(r)
240-
assert tx.status
240+
assert tx["status"]
241241

242242
# ------ Make Trade ----------------------------------------------------------------
243243
@pytest.mark.parametrize(
@@ -275,7 +275,7 @@ def test_make_trade(
275275

276276
txid = client.make_trade(input_token, output_token, qty, recipient)
277277
tx = web3.eth.wait_for_transaction_receipt(txid)
278-
assert tx.status
278+
assert tx["status"]
279279

280280
# TODO: Checks for ETH, taking gas into account
281281
bal_in_after = client.get_token_balance(input_token)
@@ -325,7 +325,7 @@ def test_make_trade_output(
325325

326326
r = client.make_trade_output(input_token, output_token, qty, recipient)
327327
tx = web3.eth.wait_for_transaction_receipt(r, timeout=30)
328-
assert tx.status
328+
assert tx["status"]
329329

330330
# TODO: Checks for ETH, taking gas into account
331331
balance_after = client.get_token_balance(output_token)

‎uniswap/cli.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ def _coerce_to_checksum(addr: str) -> str:
2525
if Web3.isChecksumAddress(addr):
2626
return addr
2727
else:
28-
# logger.warning("Address wasn't in checksum format, coercing")
29-
return Web3.toChecksumAddress(addr) # type: ignore
28+
return Web3.toChecksumAddress(addr)
3029

3130

3231
@click.group()

0 commit comments

Comments
 (0)