diff --git a/xDagWalletCLI/XDagRuntime.cpp b/xDagWalletCLI/XDagRuntime.cpp index fe010b9..9c5b1b3 100644 Binary files a/xDagWalletCLI/XDagRuntime.cpp and b/xDagWalletCLI/XDagRuntime.cpp differ diff --git a/xDagWalletCLI/XDagRuntime.h b/xDagWalletCLI/XDagRuntime.h index bb898ef..1698d2f 100644 --- a/xDagWalletCLI/XDagRuntime.h +++ b/xDagWalletCLI/XDagRuntime.h @@ -48,7 +48,7 @@ namespace XDagNetWalletCLI { int EventCallback(void* obj, xdag_event * eve); - void Start(String^ poolAddress); + void Start(String^ poolAddress, bool isTestnet); bool HasExistingAccount(); diff --git a/xDagWalletCLI/xdag_runtime.h b/xDagWalletCLI/xdag_runtime.h index a365ba3..a4e330b 100644 --- a/xDagWalletCLI/xdag_runtime.h +++ b/xDagWalletCLI/xdag_runtime.h @@ -51,7 +51,7 @@ int xdag_event_callback(void* thisObj, xdag_event *event); ////---- Exporting functions ---- -NATIVE_LIB_EXPORT int xdag_init_wrap(int argc, char **argv, const char * pool_address); +NATIVE_LIB_EXPORT int xdag_init_wrap(int argc, char **argv, const char * pool_address, bool is_test_net); NATIVE_LIB_EXPORT int xdag_set_password_callback_wrap(int(*callback)(const char *prompt, char *buf, unsigned size)); NATIVE_LIB_EXPORT int xdag_set_event_callback_wrap(int(*callback)(void*, xdag_event *)); NATIVE_LIB_EXPORT int xdag_get_state_wrap(void); @@ -69,7 +69,7 @@ NATIVE_LIB_EXPORT bool xdag_is_valid_remark(const char* remark); extern pthread_t g_client_thread; static int g_client_init_done = 0; ////---- Exporting functions wrapping functions ---- -int xdag_init_wrap(int argc, char **argv, const char* pool_address) +int xdag_init_wrap(int argc, char **argv, const char* pool_address, bool is_test_net) { xdag_init_path(argv[0]); @@ -79,7 +79,7 @@ int xdag_init_wrap(int argc, char **argv, const char* pool_address) xdag_thread_param_t param; strncpy(param.pool_arg, pool_address, 255); - param.testnet = 0; + param.testnet = is_test_net?1:0; int err = pthread_create(&g_client_thread, 0, xdag_client_thread, (void*)¶m); if (err != 0) { diff --git a/xDagWalletWin/Properties/Strings.resx b/xDagWalletWin/Properties/Strings.resx index 93d6f17..3e91bc0 100644 --- a/xDagWalletWin/Properties/Strings.resx +++ b/xDagWalletWin/Properties/Strings.resx @@ -130,7 +130,7 @@ Searching connection... - Welcome to XDAG Wallet (Version {0}) + Welcome to XDAG Testnet-Wallet (Version {0}) Confirm diff --git a/xDagWalletWin/Properties/Strings.zh.resx b/xDagWalletWin/Properties/Strings.zh.resx index b9509c9..7c69124 100644 --- a/xDagWalletWin/Properties/Strings.zh.resx +++ b/xDagWalletWin/Properties/Strings.zh.resx @@ -130,7 +130,7 @@ 正在查找网络连接... - 欢迎使用XDAG钱包 (版本 {0}) + 欢迎使用XDAG测试网钱包 (版本 {0}) 确认 @@ -253,7 +253,7 @@ 状态: - XDAG 钱包账户 + XDAG 测试网钱包账户 发起转账请求 diff --git a/xDagWalletWin/sources/UI/Windows/LogonWindow.xaml.cs b/xDagWalletWin/sources/UI/Windows/LogonWindow.xaml.cs index 7b7dcb5..c29d377 100644 --- a/xDagWalletWin/sources/UI/Windows/LogonWindow.xaml.cs +++ b/xDagWalletWin/sources/UI/Windows/LogonWindow.xaml.cs @@ -223,6 +223,7 @@ private void RegisterAccount() } string poolAddress = walletConfig.Options.PoolAddress; + bool isTestnet = walletConfig.Options.IsTestNet; PasswordWindow passwordWindow = new PasswordWindow(Properties.Strings.PasswordWindow_SetPassword, (passwordInput) => { @@ -257,7 +258,7 @@ private void RegisterAccount() ShowStatus(Properties.Strings.LogonWindow_InitializingAccount); }, () => { - runtime.Start(poolAddress); + runtime.Start(poolAddress,isTestnet); return 0; }, @@ -294,6 +295,8 @@ private void ConnectAccount() } string poolAddress = walletConfig.Options.PoolAddress; + bool isTestnet = walletConfig.Options.IsTestNet; + PasswordWindow passwordWindow = new PasswordWindow(Properties.Strings.PasswordWindow_InputPassword, (passwordInput) => { @@ -318,7 +321,7 @@ private void ConnectAccount() }, () => { logonStatus = LogonStatus.Connecting; - runtime.Start(poolAddress); + runtime.Start(poolAddress,isTestnet); return 0; }, diff --git a/xDagWalletWin/wallet-config.json b/xDagWalletWin/wallet-config.json index 0bf46aa..1b7b744 100644 --- a/xDagWalletWin/wallet-config.json +++ b/xDagWalletWin/wallet-config.json @@ -1,5 +1,5 @@ { - "version": "0.3.1", + "version": "0.4.0", "wallet_options": { "pool_address": "de2.xdag.org:13655", "rpc_enabled": false,