diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e947f5c38..219d8011bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/app/src/renderer/components/wallet/PageWallet.vue b/app/src/renderer/components/wallet/PageWallet.vue index 94fd157172..df972d5682 100644 --- a/app/src/renderer/components/wallet/PageWallet.vue +++ b/app/src/renderer/components/wallet/PageWallet.vue @@ -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" @@ -50,8 +55,8 @@ import { TmListItem, TmPage, TmPart, - TmDataEmpty, - TmDataLoading + TmDataLoading, + TmDataMsg } from "@tendermint/ui" import ModalSearch from "common/TmModalSearch" import TmToolBar from "common/TmToolBar" @@ -59,7 +64,7 @@ export default { name: "page-wallet", components: { TmDataLoading, - TmDataEmpty, + TmDataMsg, DataEmptySearch, LiCopy, TmListItem, diff --git a/test/unit/specs/components/wallet/PageWallet.spec.js b/test/unit/specs/components/wallet/PageWallet.spec.js index 540793cc24..6123d335f4 100644 --- a/test/unit/specs/components/wallet/PageWallet.spec.js +++ b/test/unit/specs/components/wallet/PageWallet.spec.js @@ -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": "" - }) + 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", () => {