From a78070a6733927afc00180118a1209748ed66576 Mon Sep 17 00:00:00 2001 From: unparalleled-js Date: Mon, 11 Jul 2022 15:32:13 -0500 Subject: [PATCH] fix: handle not connected --- ape_starknet/conversion.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ape_starknet/conversion.py b/ape_starknet/conversion.py index 5a407790..b51512a2 100644 --- a/ape_starknet/conversion.py +++ b/ape_starknet/conversion.py @@ -13,8 +13,10 @@ class StarknetAddressConverter(ConverterAPI): """ def is_convertible(self, value: Any) -> bool: + provider = self.network_manager.active_provider return ( - self.provider.network.ecosystem.name == PLUGIN_NAME + provider is not None + and provider.network.ecosystem.name == PLUGIN_NAME and isinstance(value, str) and is_hex_address(value) and not is_checksum_address(value)