Skip to content

Commit

Permalink
fix: recursion error bad uri
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Nov 4, 2024
1 parent 307c8fb commit 3be27ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ape_ethereum/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
if TYPE_CHECKING:
from ethpm_types import EventABI

from ape.api.config import PluginConfig
from ape.api.trace import TraceAPI
from ape.types.address import AddressType
from ape.types.vm import BlockID, ContractCode
Expand Down Expand Up @@ -1341,7 +1340,7 @@ def uri(self) -> str:
else:
raise TypeError(f"Not an URI: {uri}")

config: "PluginConfig" = self.config.get(self.network.ecosystem.name, None)
config: dict = self.config.get(self.network.ecosystem.name, None)
if config is None:
if rpc := self._get_random_rpc():
return rpc
Expand All @@ -1352,7 +1351,7 @@ def uri(self) -> str:
raise ProviderError(f"Please configure a URL for '{self.network_choice}'.")

# Use value from config file
network_config = (config or {}).get(self.network.name) or DEFAULT_SETTINGS
network_config: dict = (config or {}).get(self.network.name) or DEFAULT_SETTINGS

if "url" in network_config:
raise ConfigError("Unknown provider setting 'url'. Did you mean 'uri'?")
Expand Down

0 comments on commit 3be27ec

Please sign in to comment.