Skip to content

Commit 6b39255

Browse files
committed
fix: ensure _provider exist while using can_transact
1 parent 5acd881 commit 6b39255

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/aleph/sdk/chains/ethereum.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def switch_chain(self, chain: Optional[Chain] = None):
105105
def can_transact(self, tx: TxParams, block=True) -> bool:
106106
balance = self.get_eth_balance()
107107
try:
108+
assert self._provider is not None
109+
108110
estimated_gas = self._provider.eth.estimate_gas(tx)
109111
except Exception:
110112
estimated_gas = (

0 commit comments

Comments
 (0)