Kaynağa Gözat

explorer/site: update configuration keys to lowercase

Refactored all configuration keys in `site_config.toml` to use lowercase instead of uppercase for consistency.
kalm 1 yıl önce
ebeveyn
işleme
7eaab11f76

+ 2 - 2
bin/explorer/site/app.py

@@ -110,7 +110,7 @@ def load_toml_config(app, env="localnet", config_path="site_config.toml"):
 
     # Load the environment specific configurations into the Flask app's config object
     for key, value in config[env].items():
-        app.config[key.upper()] = value
+        app.config[key] = value
 
     # Print the loaded configuration for debugging or confirmation purposes
     print("\n" + "=" * 40)
@@ -118,7 +118,7 @@ def load_toml_config(app, env="localnet", config_path="site_config.toml"):
     print("=" * 40)
 
     for key in config[env]:
-        print(f"{key.upper()} = {app.config[key.upper()]}")
+        print(f"{key} = {app.config[key]}")
 
     print("=" * 40 + "\n")
 

+ 1 - 1
bin/explorer/site/rpc.py

@@ -78,7 +78,7 @@ async def query(method, params):
      returning the result of the query or raising an error if the request fails.
     """
     # Create the channel to send RPC request
-    channel = await create_channel(current_app.config['EXPLORER_RPC_URL'], current_app.config['EXPLORER_RPC_PORT'])
+    channel = await create_channel(current_app.config['explorer_rpc_url'], current_app.config['explorer_rpc_port'])
 
     # Prepare request
     request = {

+ 11 - 11
bin/explorer/site/site_config.toml

@@ -17,20 +17,20 @@
 
 # Localnet Configuration
 [localnet]
-EXPLORER_RPC_URL = "127.0.0.1"
-EXPLORER_RPC_PORT = 14567
+explorer_rpc_url = "127.0.0.1"
+explorer_rpc_port = 14567
 
-# Devnet Configuration
+# devnet configuration
 [devnet]
-EXPLORER_RPC_URL = "TODO"
-EXPLORER_RPC_PORT = "TODO"
+explorer_rpc_url = "TODO"
+explorer_rpc_port = "TODO"
 
-# Testnet Configuration
+# testnet configuration
 [testnet]
-EXPLORER_RPC_URL = "TODO"
-EXPLORER_RPC_PORT = "TODO"
+explorer_rpc_url = "TODO"
+explorer_rpc_port = "TODO"
 
-# Mainnet Configuration
+# mainnet configuration
 [mainnet]
-EXPLORER_RPC_URL = "TODO"
-EXPLORER_RPC_PORT = "TODO"
+explorer_rpc_url = "TODO"
+explorer_rpc_port = "TODO"