diff --git a/src/components/register/SignUp.vue b/src/components/register/SignUp.vue index d65571e4..b93b1515 100644 --- a/src/components/register/SignUp.vue +++ b/src/components/register/SignUp.vue @@ -72,7 +72,7 @@ export default Vue.extend({ } if (this.userInfo.type === `near`) { // If the key exists we can login him - const pk = window.localStorage.getItem(`near-api-js:${this.userInfo.accountId}:${nearNetwork}`) + const pk = window.localStorage.getItem(`near-api-js:keystore:${this.userInfo.accountId}:${nearNetwork}`) if (pk) { this.username = username await this.verify(this.username) diff --git a/src/pages/register.vue b/src/pages/register.vue index 6b463fdf..2cd8c995 100644 --- a/src/pages/register.vue +++ b/src/pages/register.vue @@ -136,14 +136,13 @@ export default Vue.extend({ walletLogout() return false }, - async created() { - await this.stepForward() - }, - mounted() { + async mounted() { const accountId = window.localStorage.getItem(`accountId`) if (this.$store.state.session.id !== `` && accountId) { this.$router.push(`/home`) + return } + await this.stepForward() }, methods: { ...mapMutations(sessionStoreNamespace, {