void onClick_wallet_password() { string password = input_wallet_password2.text; ThinNeo.NEP6.NEP6Wallet one = new ThinNeo.NEP6.NEP6Wallet(roleInfo.getInstance().wallet_json, ""); ThinNeo.NEP6.NEP6Account acc = one.accounts.Values.FirstOrDefault(); if (acc == null || acc.nep2key == null) { showNotice("密码错误或者其他错误"); return; } try { var prikey = acc.GetPrivate(one.scrypt, password); var wif = ThinNeo.Helper.GetWifFromPrivateKey(prikey); panel_password.gameObject.SetActive(false); roleInfo.getInstance().set_storage(wif); sdk_http._instance.get_main_info(); on_get_wallet_file(false); } catch { showNotice("密码错误或者其他错误"); } }
void onClick_wallet_password() { string password = input_wallet_password.text; ThinNeo.NEP6.NEP6Wallet one = new ThinNeo.NEP6.NEP6Wallet(roleInfo.getInstance().wallet_json, ""); ThinNeo.NEP6.NEP6Account acc = one.accounts.Values.FirstOrDefault(); if (acc == null || acc.nep2key == null) { testtool.showNotice("密码错误或者其他错误"); return; } try { var prikey = acc.GetPrivate(one.scrypt, password); var wif = ThinNeo.Helper.GetWifFromPrivateKey(prikey); roleInfo.getInstance().set_storage(wif); testtool.panel_login.hide(); hide(); testtool.panel_main.show(); testtool.panel_main.on_refresh_WalletListss(); testtool.panel_main.on_refresh_plat_NotifyList(); roleInfo.getInstance().logined_cb(); sdk_http._instance.get_main_info(); } catch { testtool.showNotice("密码错误或者其他错误"); } }
void onCLick_wallet_open3() { if (roleInfo.getInstance().wallet_json == "") { showNotice("未导入钱包"); return; } //默认第一个 ThinNeo.NEP6.NEP6Wallet one = new ThinNeo.NEP6.NEP6Wallet(roleInfo.getInstance().wallet_json, ""); ThinNeo.NEP6.NEP6Account acc = one.accounts.Values.FirstOrDefault(); if (acc == null || acc.nep2key == null) { showNotice("密码错误或者其他错误"); return; } try { var prikey = acc.GetPrivate(one.scrypt, input_wallet_password.text); var wif = ThinNeo.Helper.GetWifFromPrivateKey(prikey); sdk_http._instance.wallet_bind(wif, roleInfo.getInstance().wallet_json, on_get_wallet_file); } catch { showNotice("密码错误或者其他错误"); } }
void onCLick_wallet_open3() { if (roleInfo.getInstance().wallet_json == "") { testtool.showNotice("未导入钱包"); return; } //默认第一个 ThinNeo.NEP6.NEP6Wallet one = new ThinNeo.NEP6.NEP6Wallet(roleInfo.getInstance().wallet_json, ""); ThinNeo.NEP6.NEP6Account acc = one.accounts.Values.FirstOrDefault(); if (acc == null || acc.nep2key == null) { testtool.showNotice("密码错误或者其他错误"); return; } try { var prikey = acc.GetPrivate(one.scrypt, input_wallet_password.text); var wif = ThinNeo.Helper.GetWifFromPrivateKey(prikey); roleInfo.getInstance().set_storage(wif); m_panel.FindChild("wallet_open").gameObject.SetActive(false); api_tool._instance.bindWallet(roleInfo.getInstance().uid, roleInfo.getInstance().token, roleInfo.getInstance().wallet_json, on_wallet_bind); } catch { testtool.showNotice("密码错误或者其他错误"); } }