diff --git a/.env.example b/.env.example index 1a670ee2b..432846492 100644 --- a/.env.example +++ b/.env.example @@ -10,7 +10,7 @@ MAINNET_WALLET_PRIVATE_KEY= # Testnet configuration TESTNET_SHOW_IN_UI=true -TESTNET_DAPI_ADDRESSES=https://34.214.48.68:1443,https://35.166.18.166:1443,https://52.12.176.90:1443,https://44.233.44.95:1443,https://52.12.176.90:1443,https://44.233.44.95:1443,https://52.34.144.50:1443,https://44.240.98.102:1443,https://54.201.32.131:1443,https://52.10.229.11:1443,https://52.13.132.146:1443,https://44.228.242.181:1443,https://35.82.197.197:1443,https://52.40.219.41:1443,https://44.239.39.153:1443,https://54.149.33.167:1443,https://35.164.23.245:1443,https://52.33.28.47:1443,https://52.43.86.231:1443,https://52.43.13.92:1443,https://35.163.144.230:1443,https://52.89.154.48:1443,https://52.24.124.162:1443,https://35.85.21.179:1443,https://54.187.14.232:1443,https://54.68.235.201:1443,https://52.13.250.182:1443,https://35.82.49.196:1443,https://44.232.196.6:1443,https://54.189.164.39:1443,https://54.213.204.85:1443 +TESTNET_DAPI_ADDRESSES=https://34.214.48.68:1443,https://35.166.18.166:1443,https://52.12.176.90:1443,https://44.233.44.95:1443,https://52.34.144.50:1443,https://44.240.98.102:1443,https://54.201.32.131:1443,https://52.10.229.11:1443,https://52.13.132.146:1443,https://44.228.242.181:1443,https://35.82.197.197:1443,https://52.40.219.41:1443,https://44.239.39.153:1443,https://54.149.33.167:1443,https://35.164.23.245:1443,https://52.33.28.47:1443,https://52.43.86.231:1443,https://52.43.13.92:1443,https://35.163.144.230:1443,https://52.89.154.48:1443,https://52.24.124.162:1443,https://35.85.21.179:1443,https://54.187.14.232:1443,https://54.68.235.201:1443,https://52.13.250.182:1443,https://35.82.49.196:1443,https://44.232.196.6:1443,https://54.189.164.39:1443,https://54.213.204.85:1443 TESTNET_CORE_HOST=127.0.0.1 TESTNET_CORE_RPC_PORT=19998 TESTNET_CORE_RPC_USER=dashrpc diff --git a/src/app_dir.rs b/src/app_dir.rs index 69ff100d5..1ddf24937 100644 --- a/src/app_dir.rs +++ b/src/app_dir.rs @@ -45,16 +45,14 @@ pub fn copy_env_file_if_not_exists() { let app_data_dir = app_user_data_dir_path().expect("Failed to determine application data directory"); let env_file_in_app_dir = app_data_dir.join(".env".to_string()); - if env_file_in_app_dir.exists() && env_file_in_app_dir.is_file() { - } else { + if !env_file_in_app_dir.exists() || !env_file_in_app_dir.is_file() { let env_example_file_in_exe_dir = PathBuf::from(".env.example"); if env_example_file_in_exe_dir.exists() && env_example_file_in_exe_dir.is_file() { fs::copy(&env_example_file_in_exe_dir, env_file_in_app_dir) - .expect("Failed to copy main net env file"); + .expect("Failed to copy env file"); } else { let env_file_in_exe_dir = PathBuf::from(".env"); - fs::copy(&env_file_in_exe_dir, env_file_in_app_dir) - .expect("Failed to copy main net env file"); + fs::copy(&env_file_in_exe_dir, env_file_in_app_dir).expect("Failed to copy env file"); } } }