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

Fabo/0.33.0 #2225

Merged
merged 24 commits into from
Mar 11, 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
3 changes: 3 additions & 0 deletions PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@

- [\#2104](https://github.com/cosmos/voyager/issues/2104) fix transaction times @fedekunze
- [\#1805](https://github.com/cosmos/voyager/issues/1805) support all transaction types @fedekunze
- [#\2225](https://github.com/cosmos/voyager/pull/2225) local testnets now always have the same account with funds @faboweb
- [\#2224](https://github.com/cosmos/voyager/issues/2224) persist the signed in address @faboweb

### Changed

- [#\2202](https://github.com/cosmos/voyager/pull/2202) Fix circle configuration for publishing @sabau
- [#\2211](https://github.com/cosmos/voyager/pull/2211) simplified sidebar and mobile menu, cleaned up css, fixed tests @jbibla
- [#\2225](https://github.com/cosmos/voyager/pull/2225) Moved to SDK version 0.33.0 @faboweb

### Fixed

- [#\2202](https://github.com/cosmos/voyager/issues/2202) Fix number conversions @faboweb
- Misc. style fixes @jbibla
- [\#2104](https://github.com/cosmos/voyager/issues/2103) fix undelegation format changes @faboweb
2 changes: 1 addition & 1 deletion app/src/renderer/components/common/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="container">
<div class="header-item header-item-logo">
<router-link to="/">
<img src="~assets/images/cosmos-wallet-logo.svg" />
<img src="~assets/images/cosmos-wallet-logo.svg">
</router-link>
<template v-if="!desktop">
<div v-if="open" class="close-menu" @click="close()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
id="tm-disconnected-network"
class="tm-connected-network tm-disconnected-network"
>
<img class="tm-connected-network-loader" src="~assets/images/loader.svg" />
<img class="tm-connected-network-loader" src="~assets/images/loader.svg">
<div
v-tooltip.top="networkTooltip"
class="tm-connected-network__string tm-connected-network__string--connecting"
Expand Down
28 changes: 0 additions & 28 deletions app/src/renderer/components/governance/TabParameters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,6 @@
</div>

<div class="column">
<dl class="info_dl">
<dt>
Governance Penalty
<i
v-tooltip.top="tallyingTooltips.governance_penalty"
class="material-icons info-button"
>
info_outline
</i>
</dt>
<dd>
{{
governanceParameters.parameters.tallying.governance_penalty
? governanceParameters.parameters.tallying.governance_penalty
: `--`
}}
</dd>
</dl>

<dl class="info_dl">
<dt>
Quorum
Expand All @@ -130,13 +111,6 @@
}}
</dd>
</dl>
</div>
</div>
</div>

<div class="parameters__details parameters__section">
<div class="row">
<div class="column">
<dl class="info_dl">
<dt>
Voting Period
Expand All @@ -156,7 +130,6 @@
</dd>
</dl>
</div>
<div class="column" />
</div>
</div>
</div>
Expand All @@ -178,7 +151,6 @@ export default {
description: `Tally parameters for governance in the Cosmos Hub`,
threshold: `Percentage of "Yes" votes required for proposal to pass`,
veto: `Percentage of "No With Veto" votes required for proposal to be vetoed`,
governance_penalty: `Penalty for a validator who fails to vote`,
quorum: `Percentage of tokens required to vote on a proposal to be considered valid`
},
votingTooltips: {
Expand Down
2 changes: 1 addition & 1 deletion app/src/renderer/components/staking/DelegationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default {
},
async submitDelegation(submitType, password) {
await this.$store.dispatch(`submitDelegation`, {
validator_addr: this.validator.operator_address,
validator_address: this.validator.operator_address,
amount: String(uatoms(this.amount)),
submitType,
password
Expand Down
57 changes: 39 additions & 18 deletions app/src/renderer/components/staking/TabMyDelegations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
</div>
<tm-data-connecting v-else-if="!delegation.loaded && !connected" />
<tm-data-loading v-else-if="!delegation.loaded && delegation.loading" />
<tm-data-msg v-else-if="yourValidators.length === 0" icon="info_outline">
<tm-data-msg
v-else-if="yourValidators.length === 0"
icon="info_outline"
>
<div slot="title">
No Active Delegations
</div>
Expand Down Expand Up @@ -37,7 +40,7 @@
delegation.unbondingDelegations
)
"
tx-type="cosmos-sdk/Undelegate"
tx-type="cosmos-sdk/MsgUndelegate"
/>
</template>
</div>
Expand Down Expand Up @@ -86,27 +89,45 @@ export default {
)
},
unbondingTransactions: ({ transactions, delegation } = this) =>
// Checking the type of transaction
// getting the unbonding time and checking if it has passed already
transactions.staking && transactions.staking
.filter(
transaction =>
transaction.tx.value.msg[0].type === `cosmos-sdk/Undelegate`
&& time.getUnbondingTime(
transaction,
delegation.unbondingDelegations
) >= Date.now()
)
transactions.staking &&
transactions.staking
.filter(transaction => {
// Checking the type of transaction
if (transaction.tx.value.msg[0].type !== `cosmos-sdk/MsgUndelegate`)
return false

// getting the unbonding time and checking if it has passed already
const unbondingEndTime = time.getUnbondingTime(
transaction,
delegation.unbondingDelegations
)

if (unbondingEndTime && unbondingEndTime >= Date.now()) return true
})
.map(transaction => ({
...transaction,
unbondingDelegation: delegation.unbondingDelegations[
transaction.tx.value.msg[0].value.validator_addr
]
unbondingDelegation:
delegation.unbondingDelegations[
transaction.tx.value.msg[0].value.validator_address
]
}))

},
mounted() {
watch: {
"session.signedIn": function() {
this.loadStakingTxs()
}
},
async mounted() {
this.$store.dispatch(`updateDelegates`)
this.loadStakingTxs()
},
methods: {
async loadStakingTxs() {
if (this.session.signedIn) {
const stakingTxs = await this.$store.dispatch(`getTx`, `staking`)
this.$store.commit(`setStakingTxs`, stakingTxs)
}
}
}
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ export default {
return this.transaction.tx.value.msg[0].type
},
bankTx() {
return [`cosmos-sdk/Send`].includes(this.type)
return [`cosmos-sdk/MsgSend`].includes(this.type)
},
stakingTx() {
return [
`cosmos-sdk/MsgCreateValidator`,
`cosmos-sdk/MsgEditValidator`,
`cosmos-sdk/MsgDelegate`,
`cosmos-sdk/Undelegate`,
`cosmos-sdk/BeginRedelegate`,
`cosmos-sdk/MsgUndelegate`,
`cosmos-sdk/MsgBeginRedelegate`,
`cosmos-sdk/MsgUnjail`
].includes(this.type)
},
Expand Down
24 changes: 12 additions & 12 deletions app/src/renderer/components/transactions/LiStakeTransaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,44 +37,44 @@
</div>
<div slot="details">
To&nbsp;
<router-link :to="`${url}/${tx.validator_addr}`">
<router-link :to="`${url}/${tx.validator_address}`">
{{
moniker(tx.validator_addr)
moniker(tx.validator_address)
}}
</router-link>
</div>
</template>
<template v-else-if="txType === `cosmos-sdk/BeginRedelegate`">
<template v-else-if="txType === `cosmos-sdk/MsgBeginRedelegate`">
<div slot="caption">
Redelegation&nbsp;
<b>
{{
calculatePrettifiedTokens(tx.validator_src_addr, tx.shares_amount)
calculatePrettifiedTokens(tx.validator_src_address, tx.shares_amount)
}}
</b>
<span>&nbsp;{{ bondingDenom }}s</span>
</div>
<div slot="details">
From&nbsp;
<router-link :to="`${url}/${tx.validator_src_addr}`">
<router-link :to="`${url}/${tx.validator_src_address}`">
{{
moniker(tx.validator_src_addr)
moniker(tx.validator_src_address)
}}
</router-link>
&nbsp;to&nbsp;
<router-link :to="`${url}/${tx.validator_dst_addr}`">
<router-link :to="`${url}/${tx.validator_dst_address}`">
{{
moniker(tx.validator_dst_addr)
moniker(tx.validator_dst_address)
}}
</router-link>
</div>
</template>
<template v-else-if="txType === `cosmos-sdk/Undelegate`">
<template v-else-if="txType === `cosmos-sdk/MsgUndelegate`">
<div slot="caption">
Undelegation&nbsp;
<b>
{{
calculatePrettifiedTokens(tx.validator_addr, tx.shares_amount)
calculatePrettifiedTokens(tx.validator_address, tx.shares_amount)
}}
</b>
<span>&nbsp;{{ bondingDenom }}s</span>
Expand All @@ -86,9 +86,9 @@
</div>
<div slot="details">
From&nbsp;
<router-link :to="`${url}/${tx.validator_addr}`">
<router-link :to="`${url}/${tx.validator_address}`">
{{
moniker(tx.validator_addr)
moniker(tx.validator_address)
}}
</router-link>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/src/renderer/connectors/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Client = (axios, remoteLcdURL) => {
nodeVersion: req(`GET`, `/node_version`),

// tx
postTx: req(`POST`, `/tx/broadcast`),
postTx: req(`POST`, `/txs`),

// coins
send: argReq(`POST`, `/bank/accounts`, `/transfers`),
Expand Down Expand Up @@ -234,7 +234,7 @@ const Client = (axios, remoteLcdURL) => {
getDistributionTxs: async function (address, valAddress) {
return await Promise.all([
req(`GET`, `/txs?action=set_withdraw_address&delegator=${address}`)(),
req(`GET`, `/txs?action=withdraw_delegation_reward&delegator=${address}`)(),
req(`GET`, `/txs?action=withdraw_delegator_reward&delegator=${address}`)(),
req(`GET`, `/txs?action=withdraw_validator_rewards_all&source-validator=${valAddress}`)()
]).then(([
updateWithdrawAddressTxs,
Expand Down
Loading