Skip to content

Commit

Permalink
accountCreatedCard = false if there is no account
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur Badretdinov committed Jan 29, 2019
1 parent e067611 commit 5525fdb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
...{
Expand Down

0 comments on commit 5525fdb

Please sign in to comment.