diff --git a/ui/js/component/header/index.js b/ui/js/component/header/index.js index 857a04beb..08d5bb9cb 100644 --- a/ui/js/component/header/index.js +++ b/ui/js/component/header/index.js @@ -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"), }); diff --git a/ui/js/modal/modalCreditIntro/view.jsx b/ui/js/modal/modalCreditIntro/view.jsx index 5f56c11b4..9675ba275 100644 --- a/ui/js/modal/modalCreditIntro/view.jsx +++ b/ui/js/modal/modalCreditIntro/view.jsx @@ -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; diff --git a/ui/js/reducers/wallet.js b/ui/js/reducers/wallet.js index d410aae8e..e704222a6 100644 --- a/ui/js/reducers/wallet.js +++ b/ui/js/reducers/wallet.js @@ -8,7 +8,7 @@ const buildDraftTransaction = () => ({ }); const defaultState = { - balance: 0, + balance: undefined, blocks: {}, transactions: [], fetchingTransactions: false, diff --git a/ui/js/selectors/wallet.js b/ui/js/selectors/wallet.js index de7fd337b..54dacbe26 100644 --- a/ui/js/selectors/wallet.js +++ b/ui/js/selectors/wallet.js @@ -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(