From 52b5f2ebfb3df2eb71681f6c9dac9b2e4ae7290d Mon Sep 17 00:00:00 2001 From: Neil Campbell Date: Tue, 23 Jul 2024 10:50:13 +0800 Subject: [PATCH] chore: support exploring via lora when running inside a codespace (#541) --- src/algokit/cli/explore.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/algokit/cli/explore.py b/src/algokit/cli/explore.py index bc4893c7..723a91ba 100644 --- a/src/algokit/cli/explore.py +++ b/src/algokit/cli/explore.py @@ -75,19 +75,20 @@ class NetworkConfiguration(NetworkConfigurationRequired, total=False): } -# lora doesn't currently support custom networks, so use Dappflow for now. -def get_dappflow_url(network: NetworkConfiguration) -> str: - query_string = urlencode(network) - return f"https://app.dappflow.org/setup-config?{query_string}" - - def get_algokit_url(network: str) -> str: return f"https://explore.algokit.io/{network}" def get_explore_url(network: str) -> str: if network == "localnet" and NETWORKS[network].get("algod_url") != DEFAULT_ALGOD_SERVER: - return get_dappflow_url(NETWORKS[network]) + query_string = urlencode( + [ + (key, value) + for key, value in NETWORKS[network].items() + if key in ["algod_url", "algod_port", "indexer_url", "indexer_port", "kmd_url", "kmd_port"] + ] + ) + return f"{get_algokit_url(network)}?{query_string}" return get_algokit_url(network)