improve UX of account management

This commit is contained in:
liangping
2022-04-05 11:08:35 +08:00
parent 74f604bebf
commit 147dda76e3
3 changed files with 34 additions and 70 deletions
@@ -403,10 +403,11 @@ export default {
return ''
},
updateWallet(v) {
if (v && v !== 'address') {
if (v && v === 'address') {
this.wallet = 'keplr'
} else {
this.wallet = v
}
this.wallet = 'keplr'
},
},
}
+7
View File
@@ -51,6 +51,7 @@ import { ValidationProvider } from 'vee-validate'
import {
BFormRadioGroup, BFormRadio, BFormGroup,
} from 'bootstrap-vue'
import { getLocalAccounts } from '@/libs/utils'
export default {
name: 'WalletInput',
@@ -74,6 +75,12 @@ export default {
methods: {
handleInput() {
this.$emit('input', this.content)
const accounts = getLocalAccounts()
const wallet = accounts[this.$store.state.chains.defaultWallet]
if (wallet) {
wallet.device = this.content
localStorage.setItem('accounts', JSON.stringify(accounts)) // update signer device
}
},
},
}