Skip to content

Commit

Permalink
Add close buttons to Stake modal.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Braun authored and David Braun committed Sep 19, 2018
1 parent 08490b3 commit e3e1271
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* added new validator component @okwme
* simple loading indicator for page staking @faboweb
* possibility to end unbonding transactions @faboweb
* close buttons to Staking modal @NodeGuy

### Changed

Expand Down
10 changes: 10 additions & 0 deletions app/src/renderer/components/staking/ModalStake.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
.stake-header
img.icon(class='stake-atom' src="~assets/images/cosmos-logo.png")
span.tm-modal-title Stake
.tm-modal-icon.tm-modal-close(@click="close()")
i.material-icons close

//- To
tm-form-group.stake-form-group(
Expand Down Expand Up @@ -33,6 +35,11 @@

//- Footer
.stake-footer
tm-btn(
@click.native="close"
size="lg"
value="Cancel"
)
tm-btn(
@click.native="onStake"
color="primary"
Expand Down Expand Up @@ -105,4 +112,7 @@ export default {
.stake-footer
display flex
justify-content flex-end
button
margin-left 1em
</style>
23 changes: 13 additions & 10 deletions test/unit/specs/components/staking/PageValidator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const getterValues = {
keybase: `keybase`,
oldBondedAtoms: 50,
totalAtoms: 100,
user: { atoms: 50 },
user: { atoms: 42 },
wallet: { address: `cosmosaccaddr15ky9du8a2wlstz6fpx3p4mqpjyrm5ctpesxxn9` }
}

Expand Down Expand Up @@ -399,15 +399,16 @@ describe(`onStake`, () => {
delegate: {
bond_height: "0",
bond_intra_tx_counter: 6,
commission: "0",
commission_change_rate: "0",
commission_change_today: "0",
commission_max: "0",
commission: "0.05",
commission_change_rate: "0.01",
commission_change_today: "0.005",
commission_max: "0.1",
delegator_shares: "19",
description: {
country: "DE",
description: "Herr Schmidt",
moniker: "herr_schmidt_revoked"
details: "Herr Schmidt",
moniker: "herr_schmidt_revoked",
website: "www.schmidt.de"
},
keybase: undefined,
owner: "1a2b3c",
Expand All @@ -417,9 +418,11 @@ describe(`onStake`, () => {
data: "dlN5SLqeT3LT9WsUK5iuVq1eLQV2Q1JQAuyN0VwSWK0=",
type: "AC26791624DE60"
},
revoked: true,
revoked: false,
selfBond: 0.01,
status: 2,
tokens: "19"
tokens: "19",
voting_power: "10"
}
}
]
Expand All @@ -443,7 +446,7 @@ describe(`onStake`, () => {
])

expect($store.commit.mock.calls).toEqual([
["setAtoms", 40],
["setAtoms", 32],
[
"notify",
{
Expand Down

0 comments on commit e3e1271

Please sign in to comment.