Commit bae01511 authored by xhx's avatar xhx

fix:导入地址

parent 8d41c4fb
...@@ -79,20 +79,30 @@ import { passwdInputProxy } from '@/utils/passwdProxy'; ...@@ -79,20 +79,30 @@ import { passwdInputProxy } from '@/utils/passwdProxy';
import { importSeed } from '@/utils/bridge'; import { importSeed } from '@/utils/bridge';
import { createAccount } from '@/utils/account'; import { createAccount } from '@/utils/account';
import { Toast, Dialog } from 'vant'; import { Toast, Dialog } from 'vant';
import { mapState } from 'vuex';
export default Vue.extend({ export default Vue.extend({
data() { data() {
return { return {
// mapState({
// wifiName: ''
// }),
pageShow: false, pageShow: false,
wifiName: '', wifiName: '',
devices: [] as Array<any>, devices: [] as Array<any>,
isfeedback: false, isfeedback: false,
btyAddress: '' // btyAddress: ''
} }
}, },
computed: { computed: {
APP_NAME():string { APP_NAME():string {
return APP_NAME return APP_NAME
} },
btyAddress():string {
return this.$store.state.app.address
},
// ...mapState({
// btyAddress: (state: any) => state.app.address
// })
}, },
components: { components: {
DeviceItem, DeviceItem,
...@@ -116,7 +126,7 @@ export default Vue.extend({ ...@@ -116,7 +126,7 @@ export default Vue.extend({
}, },
resetWalletHandler(params: any){ resetWalletHandler(params: any){
if (!this.isEqualBtyAddress(params.mineAddress)) { if (!this.isEqualBtyAddress(params.mineAddress)) {
this.$toast('请确认当前币钱包地址与YUAN-miner设备地址一致'); this.$toast('请确认当前币钱包地址与设备地址一致');
return; return;
} }
let toast: any; let toast: any;
...@@ -159,8 +169,8 @@ export default Vue.extend({ ...@@ -159,8 +169,8 @@ export default Vue.extend({
Dialog Dialog
.alert({ .alert({
title: '关闭成功', title: '关闭成功',
// message: '矿机程序已经下载完成,请手动重启YUAN-miner设备',//请等待YUAN-miner程序重启 // message: '矿机程序已经下载完成,请手动重启设备',//请等待程序重启
message: '节点关闭成功,请手动关闭YUAN-miner设备', message: '节点关闭成功,请手动关闭设备',
}) })
.then(() => { .then(() => {
// on close // on close
...@@ -190,7 +200,7 @@ export default Vue.extend({ ...@@ -190,7 +200,7 @@ export default Vue.extend({
}, },
routeTo(params: any) { routeTo(params: any) {
if (!this.isEqualBtyAddress(params.mineAddress)) { if (!this.isEqualBtyAddress(params.mineAddress)) {
this.$toast('请确认当前币钱包地址与YUAN-miner设备地址一致'); this.$toast('请确认当前币钱包地址与设备地址一致');
return; return;
} }
this.$router.push({ this.$router.push({
...@@ -218,7 +228,7 @@ export default Vue.extend({ ...@@ -218,7 +228,7 @@ export default Vue.extend({
forbidClick: true, forbidClick: true,
message: '正在导入钱包,请稍后...' message: '正在导入钱包,请稍后...'
}); });
const label = 'YUAN-miner节点'; const label = '节点';
await createAccount({ await createAccount({
seed, seed,
passwd, passwd,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment