修正了Login.vue里"renewing"的问题,但仍然不能调用 randomSecword(),这句导致报错 "window is not defined"。猜测是 bitcore-mnemonic 不能在前端页面里使用。
This commit is contained in:
@@ -10,6 +10,7 @@ export default {
|
||||
mnemonic: '',
|
||||
errorMnemonic: '',
|
||||
signing: false,
|
||||
renewing: false,
|
||||
},
|
||||
|
||||
getters: {
|
||||
@@ -36,7 +37,7 @@ export default {
|
||||
actions: {
|
||||
async login({ state, commit }) {
|
||||
commit('updateSign', true)
|
||||
const account = (await ticApi.secword2Account(state.mnemonic)) || {}
|
||||
const account = (await ticApi.secword2account(state.mnemonic)) || {}
|
||||
console.log(account)
|
||||
commit('updateSign', false)
|
||||
if (await ticApi.isAddress(account.address)) {
|
||||
@@ -48,7 +49,7 @@ export default {
|
||||
},
|
||||
async createSecword({ state, commit }) {
|
||||
alert('entering createSecword')
|
||||
let secword = await ticApi.randomSecword('English')
|
||||
let secword = await ticApi.randomSecword() // 这句导致报错 "window is not defined"。猜测是 bitcore-mnemonic 不能在前端页面里使用。
|
||||
alert('after secword')
|
||||
console.info('secword=' + secword)
|
||||
alert('secword=' + secword)
|
||||
|
||||
Reference in New Issue
Block a user