|
|
@ -457,6 +457,10 @@ class LoginSection extends connect(store)(LitElement) { |
|
|
|
return html`${translate("login.error2")}` |
|
|
|
return html`${translate("login.error2")}` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renderError3Text() { |
|
|
|
|
|
|
|
return html`${translate("login.lp8")}` |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
selectWallet(wallet) { |
|
|
|
selectWallet(wallet) { |
|
|
|
this.selectedWallet = wallet |
|
|
|
this.selectedWallet = wallet |
|
|
|
this.selectedPage = 'unlockStored' |
|
|
|
this.selectedPage = 'unlockStored' |
|
|
@ -617,19 +621,15 @@ class LoginSection extends connect(store)(LitElement) { |
|
|
|
|
|
|
|
|
|
|
|
// First decrypt...
|
|
|
|
// First decrypt...
|
|
|
|
this.loadingRipple.welcomeMessage = this.renderPrepareText() |
|
|
|
this.loadingRipple.welcomeMessage = this.renderPrepareText() |
|
|
|
// const x = e.clientX !== undefined ? e.clientX : e.explicitOriginalTarget.getBoundingClientRect().left + window.scrollX
|
|
|
|
|
|
|
|
// const y = e.clientY !== undefined ? e.clientY : e.explicitOriginalTarget.getBoundingClientRect().top + window.scrollY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.loadingRipple.open({ |
|
|
|
this.loadingRipple.open({ |
|
|
|
x: e.clientX, |
|
|
|
x: e.clientX, |
|
|
|
y: e.clientY |
|
|
|
y: e.clientY |
|
|
|
}) |
|
|
|
}).then(() => { |
|
|
|
.then(() => { |
|
|
|
|
|
|
|
const source = this.walletSources[type]() |
|
|
|
const source = this.walletSources[type]() |
|
|
|
return createWallet(type, source, status => { |
|
|
|
return createWallet(type, source, status => { |
|
|
|
this.loadingRipple.loadingMessage = status |
|
|
|
this.loadingRipple.loadingMessage = status |
|
|
|
}) |
|
|
|
}).then(wallet => { |
|
|
|
.then(wallet => { |
|
|
|
|
|
|
|
store.dispatch(doLogin(wallet)) |
|
|
|
store.dispatch(doLogin(wallet)) |
|
|
|
store.dispatch(doSelectAddress(wallet.addresses[0])) |
|
|
|
store.dispatch(doSelectAddress(wallet.addresses[0])) |
|
|
|
this.navigate('show-address') |
|
|
|
this.navigate('show-address') |
|
|
@ -639,7 +639,6 @@ class LoginSection extends connect(store)(LitElement) { |
|
|
|
if (!storedWalletAddress) { |
|
|
|
if (!storedWalletAddress) { |
|
|
|
if (this.saveInBrowser && type !== 'storedWallet') { |
|
|
|
if (this.saveInBrowser && type !== 'storedWallet') { |
|
|
|
store.dispatch(doStoreWallet(wallet, source.password, source.name, () => { |
|
|
|
store.dispatch(doStoreWallet(wallet, source.password, source.name, () => { |
|
|
|
|
|
|
|
|
|
|
|
ripple.loadingMessage = status |
|
|
|
ripple.loadingMessage = status |
|
|
|
})).catch(err => console.error(err)) |
|
|
|
})).catch(err => console.error(err)) |
|
|
|
} |
|
|
|
} |
|
|
@ -648,9 +647,8 @@ class LoginSection extends connect(store)(LitElement) { |
|
|
|
this.cleanup() |
|
|
|
this.cleanup() |
|
|
|
return this.loadingRipple.fade() |
|
|
|
return this.loadingRipple.fade() |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).catch(e => { |
|
|
|
.catch(e => { |
|
|
|
this.loginErrorMessage = this.renderError3Text() |
|
|
|
this.loginErrorMessage = e |
|
|
|
|
|
|
|
console.error(e) |
|
|
|
console.error(e) |
|
|
|
return this.loadingRipple.close() |
|
|
|
return this.loadingRipple.close() |
|
|
|
}) |
|
|
|
}) |
|
|
|