From 5525fdb5f5b98d642556c6b44330dbce53324d20 Mon Sep 17 00:00:00 2001 From: Timur Badretdinov Date: Tue, 29 Jan 2019 22:49:17 +0300 Subject: [PATCH] accountCreatedCard = false if there is no account --- src/store/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index a0e7767..4bf772e 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -668,9 +668,10 @@ const store = new Vuex.Store({ let cardInformation = state.cards.filter(card => { return card.cardIndex === cardIndex.toNumber(); }); - let accountCreatedCard = - web3.utils.toChecksumAddress(state.account) === - web3.utils.toChecksumAddress(gifter); //if the current account created the card + //if the current account created the card + let accountCreatedCard = state.account === null + ? false + : web3.utils.toChecksumAddress(state.account) === web3.utils.toChecksumAddress(gifter); let allCardInformation = { ...{