default balance to undefined, fixes #534

This commit is contained in:
Jeremy Kauffman 2017-09-06 15:05:35 -04:00
parent b8dd1fccbc
commit b32f3cbafe
4 changed files with 3 additions and 4 deletions

View file

@ -16,7 +16,7 @@ import Header from "./view";
const select = state => ({
isBackDisabled: selectIsBackDisabled(state),
isForwardDisabled: selectIsForwardDisabled(state),
balance: formatCredits(selectBalance(state), 1),
balance: formatCredits(selectBalance(state) || 0, 1),
publish: __("Publish"),
});

View file

@ -2,7 +2,6 @@ import React from "react";
import { Modal } from "modal/modal";
import { CreditAmount, CurrencySymbol } from "component/common";
import Link from "component/link/index";
import { formatCredits } from "util/formatCredits";
const ModalCreditIntro = props => {
const { closeModal, currentBalance, totalRewardValue, verifyAccount } = props;

View file

@ -8,7 +8,7 @@ const buildDraftTransaction = () => ({
});
const defaultState = {
balance: 0,
balance: undefined,
blocks: {},
transactions: [],
fetchingTransactions: false,

View file

@ -4,7 +4,7 @@ export const _selectState = state => state.wallet || {};
export const selectBalance = createSelector(
_selectState,
state => state.balance || 0
state => state.balance
);
export const selectTransactions = createSelector(