File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change 144
144
<q-item-section side center >
145
145
<q-item-label class =" code text-vgreen" caption > {{ node.balance }} </q-item-label >
146
146
</q-item-section >
147
- <q-item-section avatar >
148
- <q-btn outline color =" vgreen" v-on:click =" addToVote(node)" v-if =" node.account != 'No account found' && !voting_list.includes(node) " >Vote</q-btn >
149
- <q-btn color =" vgreen" class =" text-vdark" v-on:click =" addToVote(node)" v-if =" node.account != 'No account found' && voting_list.includes(node)" >Vote</q-btn >
147
+ <q-item-section avatar v-if = " identity.account_name && node.account != identity.account_name && node.account != 'No account found' " >
148
+ <q-btn outline color =" vgreen" v-on:click =" addToVote(node)" v-if =" !voting_list.includes(node) " >Vote</q-btn >
149
+ <q-btn color =" vgreen" class =" text-vdark" v-on:click =" addToVote(node)" v-if =" voting_list.includes(node)" >Vote</q-btn >
150
150
</q-item-section >
151
151
</q-item >
152
152
</q-list >
@@ -499,16 +499,20 @@ export default {
499
499
const eos = new EosWrapper ()
500
500
try {
501
501
let accounts = await eos .getAccounts (key)
502
- this .identity .account_name = accounts .account_names [0 ]
503
- this .checkAccountAdded ()
504
- this .checkAccountRegistered ()
505
- this .checkAccountRun ()
506
- this .getUptime ()
507
- this .getRank ()
508
- this .getBalance ()
509
- this .getVoted ()
502
+ this .identity .account_name = accounts .account_names [0 ] ? accounts .account_names [0 ] : ' '
503
+ if (this .identity .account_name ) {
504
+ this .checkAccountAdded ()
505
+ this .checkAccountRegistered ()
506
+ this .checkAccountRun ()
507
+ this .getUptime ()
508
+ this .getRank ()
509
+ this .getBalance ()
510
+ this .getVoted ()
511
+ } else {
512
+ this .errorMessage = ' Seems like you don\' t have an EOS account. An account is required to work with a vDexNode. Please create one using your public key.'
513
+ this .errorDialog = true
514
+ }
510
515
} catch (error) {
511
- this .identity .account_name = ' none'
512
516
this .errorMessage = error
513
517
this .errorDialog = true
514
518
}
You can’t perform that action at this time.
0 commit comments