Skip to content

Commit

Permalink
Merge pull request #1029 from cosmos/fabo/996-account-empty-message
Browse files Browse the repository at this point in the history
added account empty message
  • Loading branch information
faboweb authored Jul 27, 2018
2 parents 48e3424 + bf71689 commit b654cdd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* Extracted components into @tendermint/ui for use in explorer @okwme
* using new old testnet repo for getting genesis files @faboweb
* switched to Gaia-7003 @faboweb
* Message for empty account @faboweb

### Fixed

Expand Down
13 changes: 9 additions & 4 deletions app/src/renderer/components/wallet/PageWallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ tm-page(title='Wallet')

tm-part#part-available-balances(title="Available Balances")
tm-data-loading(v-if="wallet.balancesLoading")
tm-data-empty(v-else-if="wallet.balances.length === 0")
tm-data-msg(id="account_empty_msg" v-else-if="wallet.balances.length === 0" icon="help_outline")
div(slot="title") Account empty
div(slot="subtitle")
| This account doesn't hold any coins yet. Go to the
a(href="https://gaia.faucetcosmos.network/") token faucet
|  to aquire tokens to play with.
data-empty-search(v-else-if="filteredBalances.length === 0")
tm-list-item.tm-li-balance(
v-for="i in filteredBalances"
Expand Down Expand Up @@ -50,16 +55,16 @@ import {
TmListItem,
TmPage,
TmPart,
TmDataEmpty,
TmDataLoading
TmDataLoading,
TmDataMsg
} from "@tendermint/ui"
import ModalSearch from "common/TmModalSearch"
import TmToolBar from "common/TmToolBar"
export default {
name: "page-wallet",
components: {
TmDataLoading,
TmDataEmpty,
TmDataMsg,
DataEmptySearch,
LiCopy,
TmListItem,
Expand Down
6 changes: 2 additions & 4 deletions test/unit/specs/components/wallet/PageWallet.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,10 @@ describe("PageWallet", () => {
})

it("should show the n/a message if there are no denoms", () => {
let { store, wrapper } = mount(PageWallet, {
"data-empty": "<data-empty />"
})
let { store, wrapper } = mount(PageWallet)
store.commit("setWalletBalances", [])
wrapper.update()
expect(wrapper.find("data-empty")).toBeDefined()
expect(wrapper.find("#account_empty_msg").exists()).toBeTruthy()
})

it("should not show the n/a message if there are denoms", () => {
Expand Down

0 comments on commit b654cdd

Please sign in to comment.