Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automatic release created for v1.0.0-beta.27 #2342

Merged
merged 24 commits into from
Mar 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [1.0.0-beta.27] - 2019-03-25

### Added

- [\#2149](https://github.com/cosmos/voyager/issues/2149) display multi-message transactions @fedekunze

### Fixed

- [\#2330](https://github.com/cosmos/voyager/pull/2330) Fixed rewards not updating as expected @faboweb
- [\#2330](https://github.com/cosmos/voyager/pull/2330) Fixed transactions not loading when refreshing on PageTransactions @faboweb
- Fixed rewards not showing @faboweb

## [1.0.0-beta.26] - 2019-03-22

### Changed
Expand Down
17 changes: 12 additions & 5 deletions app/src/renderer/components/common/TmBalance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<div class="header-balance">
<div class="top">
<div class="total-atoms top-section">
<h3>Total {{ bondDenom }}</h3>
<h3>Total {{ num.viewDenom(bondDenom) }}</h3>
<h2 class="total-atoms__value">
{{ totalAtomsDisplay }}
</h2>
<short-bech32 :address="session.address || ''" />
</div>
<div v-if="unbondedAtoms" class="unbonded-atoms top-section">
<h3>Available {{ bondDenom }}</h3>
<h3>Available {{ num.viewDenom(bondDenom) }}</h3>
<h2>{{ unbondedAtoms }}</h2>
</div>
<div v-if="rewards" class="top-section">
Expand Down Expand Up @@ -45,7 +45,8 @@ export default {
},
data() {
return {
num
num,
lastUpdate: 0
}
},
computed: {
Expand Down Expand Up @@ -85,8 +86,14 @@ export default {
lastHeader: {
immediate: true,
handler(newHeader) {
const waitTenBlocks = Number(newHeader.height) % 10 === 0
if (this.session.signedIn && waitTenBlocks) {
const height = Number(newHeader.height)
// run the update queries the first time and after every 10 blocks
const waitedTenBlocks = height - this.lastUpdate >= 10
if (
this.session.signedIn &&
(this.lastUpdate === 0 || waitedTenBlocks)
) {
this.lastUpdate = height
this.$store.dispatch(`getTotalRewards`)
this.$store.dispatch(`queryWalletBalances`)
}
Expand Down
7 changes: 5 additions & 2 deletions app/src/renderer/components/common/TmOnboarding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

<script>
import { mapGetters } from "vuex"
import num from "scripts/num"
import PerfectScrollbar from "perfect-scrollbar"
import TmBarDiscrete from "common/TmBarDiscrete"
import TmBtn from "common/TmBtn"
Expand All @@ -64,9 +65,11 @@ export default {
const nodes = [
`This is a quick tour of the primary features of Cosmos Voyager.`,
`You can send and receive Cosmos tokens from anyone around the world.`,
`You can delegate your ${
`You can delegate your ${num.viewDenom(
this.bondDenom
} to Cosmos Validators to earn even more ${this.bondDenom}.`,
)} to Cosmos Validators to earn even more ${num.viewDenom(
this.bondDenom
)}.`,
`Through governance, you can vote on the future of the Cosmos Network.`,
`Start using Voyager to explore the Cosmos Network!`
]
Expand Down
4 changes: 2 additions & 2 deletions app/src/renderer/components/network/PageNetwork.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<div class="row">
<div class="column">
<dl class="info_dl">
<dt>Total Liquid {{ bondDenom }}</dt>
<dt>Total Liquid {{ num.viewDenom(bondDenom) }}</dt>
<dd id="loose_tokens">
{{
pool.pool && pool.pool.not_bonded_tokens
Expand All @@ -55,7 +55,7 @@
</div>
<div class="column">
<dl class="info_dl">
<dt>Total Delegated {{ bondDenom }}</dt>
<dt>Total Delegated {{ num.viewDenom(bondDenom) }}</dt>
<dd id="bonded_tokens">
{{
pool.pool && pool.pool.bonded_tokens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
field-id="amount"
field-label="Amount"
>
<span class="input-suffix">{{ bondDenom }}</span>
<span class="input-suffix">{{ num.viewDenom(bondDenom) }}</span>
<tm-field
id="amount"
v-model="totalRewards"
Expand Down
6 changes: 3 additions & 3 deletions app/src/renderer/components/staking/PageValidator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
import moment from "moment"
import { calculateTokens } from "scripts/common"
import { mapGetters } from "vuex"
import { percent, pretty, atoms, full } from "scripts/num"
import num, { percent, pretty, atoms, full } from "scripts/num"
import TmBtn from "common/TmBtn"
import { shortAddress, ratToBigNumber } from "scripts/common"
import DelegationModal from "staking/DelegationModal"
Expand Down Expand Up @@ -233,7 +233,7 @@ export default {
const totalBlocks = this.lastHeader.height
const missedBlocks = this.validator.signing_info.missed_blocks_counter
const signedBlocks = totalBlocks - missedBlocks
const uptime = (signedBlocks / totalBlocks) * 100
const uptime = signedBlocks / totalBlocks * 100

return String(uptime).substring(0, 4) + `%`
},
Expand All @@ -249,7 +249,7 @@ export default {
myDelegation() {
const { bondDenom, myBond } = this
const myDelegation = full(myBond)
const myDelegationString = `${myDelegation} ${bondDenom}`
const myDelegationString = `${myDelegation} ${num.viewDenom(bondDenom)}`
return Number(myBond) === 0 ? `--` : myDelegationString
},
powerRatio() {
Expand Down
47 changes: 18 additions & 29 deletions app/src/renderer/components/staking/TabMyDelegations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
No Active Delegations
</div>
<div slot="subtitle">
Looks like you haven't delegated any {{ bondDenom }}s yet. Head over to
the
Looks like you haven't delegated any {{ num.viewDenom(bondDenom) }}s
yet. Head over to the
<router-link :to="{ name: 'Validators' }">
validator list
</router-link>
Expand All @@ -27,23 +27,21 @@
Pending Undelegations
</h3>
<div class="unbonding-transactions">
<template v-for="transaction in unbondingTransactions">
<li-stake-transaction
:key="transaction.hash"
:transaction="transaction"
<template>
<li-any-transaction
v-for="tx in unbondingTransactions"
:key="tx.txhash"
:validators="yourValidators"
:validators-url="`/staking/validators`"
:proposals-url="`/governance`"
:transaction="tx"
:address="session.address"
:bonding-denom="bondDenom"
:url="validatorURL"
:fees="transaction.tx.value.fee.amount &&
transaction.tx.value.fee.amount[0]"
:unbonding-time="
time.getUnbondingTime(
transaction,
delegation.unbondingDelegations
)
time.getUnbondingTime(tx, delegation.unbondingDelegations)
"
tx-type="cosmos-sdk/MsgUndelegate"
/>
<br>
</template>
</div>
</div>
Expand All @@ -53,7 +51,7 @@
<script>
import { mapGetters } from "vuex"
import num from "scripts/num"
import LiStakeTransaction from "../transactions/LiStakeTransaction"
import LiAnyTransaction from "../transactions/LiAnyTransaction"
import TmDataMsg from "common/TmDataMsg"
import CardSignInRequired from "common/CardSignInRequired"
import TmDataLoading from "common/TmDataLoading"
Expand All @@ -68,14 +66,15 @@ export default {
TmDataMsg,
TmDataConnecting,
TmDataLoading,
LiStakeTransaction,
LiAnyTransaction,
CardSignInRequired
},
data: () => ({
unbondTransactions: `Transactions currently in the undelegation period`,
validatorURL: `/staking/validators`,
time,
num
num,
lastUpdate: 0
}),
computed: {
...mapGetters([
Expand Down Expand Up @@ -132,18 +131,8 @@ export default {
},
lastHeader: {
immediate: true,
handler(newHeader) {
const waitTwentyBlocks = Number(newHeader.height) % 20 === 0
if (
waitTwentyBlocks &&
this.yourValidators &&
this.yourValidators.length > 0
) {
this.$store.dispatch(
`getRewardsFromAllValidators`,
this.yourValidators
)
}
handler() {
this.$store.dispatch(`getRewardsFromMyValidators`)
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<dl class="info_dl">
<dt>Current Staking Token</dt>
<dd id="bond_denom">
{{ bondDenom ? bondDenom : `--` }}
{{ bondDenom ? num.viewDenom(bondDenom) : `--` }}
</dd>
</dl>
</div>
Expand All @@ -53,6 +53,7 @@

<script>
import { mapGetters } from "vuex"
import num from "scripts/num"
import TmDataConnecting from "common/TmDataConnecting"
import TmDataLoading from "common/TmDataLoading"
export default {
Expand All @@ -62,6 +63,7 @@ export default {
TmDataLoading
},
data: () => ({
num,
paramsTooltips: {
description: `Staking parameters define the high level settings for staking`,
unbonding_time: `Time to complete an undelegation transaction and claim rewards`,
Expand Down
38 changes: 9 additions & 29 deletions app/src/renderer/components/staking/TabValidators.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,34 @@ export default {
TmDataLoading,
TmDataConnecting
},
data: () => ({
lastUpdate: 0
}),
computed: {
...mapGetters([
`lastHeader`,
`delegates`,
`committedDelegations`,
`connected`,
`session`
]),
yourValidators(
{
committedDelegations,
delegates: { delegates },
session: { signedIn }
} = this
) {
return (
signedIn &&
delegates.filter(
({ operator_address }) => operator_address in committedDelegations
)
)
}
`session`,
`yourValidators`
])
},
watch: {
"session.signedIn": function(signedIn) {
signedIn && this.$store.dispatch(`updateDelegates`)
},
lastHeader: {
immediate: true,
handler(newHeader) {
const waitTwentyBlocks = Number(newHeader.height) % 20 === 0
if (
waitTwentyBlocks &&
this.yourValidators &&
this.yourValidators.length > 0
) {
this.$store.dispatch(
`getRewardsFromAllValidators`,
this.yourValidators
)
}
handler() {
this.$store.dispatch(`getRewardsFromMyValidators`)
}
}
},
mounted() {
this.$store.dispatch(`updateDelegates`)
if (this.yourValidators) {
this.$store.dispatch(`getRewardsFromAllValidators`, this.yourValidators)
this.$store.dispatch(`getRewardsFromMyValidators`, this.yourValidators)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/renderer/components/staking/TableValidators.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export default {
{
title: `My Delegations`,
value: `my_delegations`,
tooltip: `Number of ${
tooltip: `Number of ${num.viewDenom(
this.bondDenom
} you have delegated to this validator`
)} you have delegated to this validator`
},
{
title: `Rewards`,
Expand Down
Loading