From 7e4c677836997c26c58584de96a7f72aeadfe6dd Mon Sep 17 00:00:00 2001 From: Voyager Bot Date: Wed, 13 Mar 2019 15:35:36 +0100 Subject: [PATCH 01/12] added local faucet account and fix for testnet --- .aws/first.sh | 3 +++ PENDING.md | 4 +++- tasks/gaia.js | 40 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/.aws/first.sh b/.aws/first.sh index c7572804e6..5c3009ddfd 100644 --- a/.aws/first.sh +++ b/.aws/first.sh @@ -20,6 +20,9 @@ echo ${PASSWORD} | ./gaiacli keys add ${ACCOUNT} --home . > account_address.log echo ${PASSWORD} | ./gaiad gentx --name ${ACCOUNT} --home . --home-client . ./gaiad collect-gentxs --home . +MINT_CONFIG="{\"minter\":{\"inflation\":\"0.000000001300000000\",\"annual_provisions\":\"0.000000000000000000\"},\"params\":{\"mint_denom\":\"stake\",\"inflation_rate_change\":\"0.130000000000000000\",\"inflation_max\":\"0.000000002000000000\",\"inflation_min\":\"0.000000000700000000\",\"goal_bonded\":\"0.000000006700000000\",\"blocks_per_year\":\"6311520\"}}" +jq '.app_state = ${MINT_CONFIG}' config/genesis.json > config/genesis.json + # Make our genesis avaialable to the secondary nodes aws s3 cp config/genesis.json s3://cosmos-gaia/genesis.json diff --git a/PENDING.md b/PENDING.md index 598264e7e9..2b5634f867 100644 --- a/PENDING.md +++ b/PENDING.md @@ -2,10 +2,12 @@ - [#\2188](https://github.com/cosmos/voyager/issues/2188) Fixed issues with the way we were loading PageNetwork @jbibla - [#\2246](https://github.com/cosmos/voyager/issues/2246) Fix from moniker not visible on withdraw txs @faboweb +- Fix for inflation on our testnet ### Added - [\#1959](https://github.com/cosmos/voyager/issues/1959) display transactions on block page @fedekunze +- Added a faucet account to the local testnet to simulate the remote testnet better @faboweb ### Changed -- Ignore changelog check on master @faboweb \ No newline at end of file +- Ignore changelog check on master @faboweb diff --git a/tasks/gaia.js b/tasks/gaia.js index 481274c6a9..be22e4de64 100644 --- a/tasks/gaia.js +++ b/tasks/gaia.js @@ -1,6 +1,7 @@ const path = require(`path`) const fs = require(`fs-extra`) const util = require(`util`) +const BN = require(`bignumber.js`) const { spawn, exec } = require(`child_process`) const { sleep } = require(`../test/e2e/common.js`) @@ -20,6 +21,11 @@ const defaultStartPort = 26656 const getStartPort = nodeNumber => defaultStartPort - (nodeNumber - 1) * 3 const defaultStakePool = 2000 * 10e6 const defaultStakedPerValidator = 10 * 10e6 +const faucet = { + address: `cosmos1eu3j9yu63cd5exte5nw4l3wj83eqs9kcn8zlcn`, + mnemonic: `used rail ancient side orange merit since ensure this tool clock balance aerobic cheese bulk iron toward model wage then engage differ desk budget`, + amount: 100000000000000000 +} // initialise the node config folder and genesis async function initNode( @@ -57,6 +63,10 @@ async function initGenesis( await makeExec( `${nodeBinary} add-genesis-account ${address} ${defaultStakePool}stake,1000photino --home ${nodeHomeDir}` ) + // faucet, we add this to better emulate testnet behaviour on local testnets + await makeExec( + `${nodeBinary} add-genesis-account ${faucet.address} ${faucet.amount}stake --home ${nodeHomeDir}` + ) await makeExecWithInputs( `${nodeBinary} gentx --name ${keyName} --home ${nodeHomeDir} --home-client ${clientHomeDir}`, @@ -67,7 +77,9 @@ async function initGenesis( await makeExec(`${nodeBinary} collect-gentxs --home ${nodeHomeDir}`) const genesisLocation = path.join(nodeHomeDir, `config/genesis.json`) - const genesis = require(genesisLocation) + let genesis = require(genesisLocation) + genesis = fixInflation(genesis, faucet.amount) + fs.writeJSONSync(genesisLocation, genesis, `utf8`) return genesis } @@ -303,3 +315,29 @@ module.exports = { makeExec, makeExecWithInputs } + +// the default inflation with a faucet active is producing so much stake that users could take over the network pretty quick. this throttles this +function fixInflation(genesis, faucetAmount) { + const inflationFactor = faucetAmount / 1000000000000 // on the actual testnet it is / 1000000000 + const defaultMintValue = genesis.app_state.mint + genesis.app_state.mint = { + minter: { + inflation: BN(defaultMintValue.minter.inflation) + .div(inflationFactor).toFixed(18), + annual_provisions: `0.000000000000000000` + }, + params: { + mint_denom: `stake`, + inflation_rate_change: `0.130000000000000000`, + inflation_max: BN(defaultMintValue.params.inflation_max) + .div(inflationFactor).toFixed(18), + inflation_min: BN(defaultMintValue.params.inflation_min) + .div(inflationFactor).toFixed(18), + goal_bonded: BN(defaultMintValue.params.goal_bonded) + .div(inflationFactor).toFixed(18), + blocks_per_year: `6311520` + } + } + + return genesis +} \ No newline at end of file From 11202691d533d8cdcc285d37399319356cb6fc48 Mon Sep 17 00:00:00 2001 From: Karoly Albert Szabo Date: Wed, 13 Mar 2019 16:37:57 +0100 Subject: [PATCH 02/12] Update .aws/first.sh Co-Authored-By: faboweb --- .aws/first.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.aws/first.sh b/.aws/first.sh index 5c3009ddfd..8af38f1813 100644 --- a/.aws/first.sh +++ b/.aws/first.sh @@ -20,7 +20,7 @@ echo ${PASSWORD} | ./gaiacli keys add ${ACCOUNT} --home . > account_address.log echo ${PASSWORD} | ./gaiad gentx --name ${ACCOUNT} --home . --home-client . ./gaiad collect-gentxs --home . -MINT_CONFIG="{\"minter\":{\"inflation\":\"0.000000001300000000\",\"annual_provisions\":\"0.000000000000000000\"},\"params\":{\"mint_denom\":\"stake\",\"inflation_rate_change\":\"0.130000000000000000\",\"inflation_max\":\"0.000000002000000000\",\"inflation_min\":\"0.000000000700000000\",\"goal_bonded\":\"0.000000006700000000\",\"blocks_per_year\":\"6311520\"}}" +MINT_CONFIG='{"minter":{"inflation":"0.000000001300000000","annual_provisions":"0.000000000000000000"},"params":{"mint_denom":"stake","inflation_rate_change":"0.130000000000000000","inflation_max":"0.000000002000000000","inflation_min":"0.000000000700000000","goal_bonded":"0.000000006700000000","blocks_per_year":"6311520"}}"' jq '.app_state = ${MINT_CONFIG}' config/genesis.json > config/genesis.json # Make our genesis avaialable to the secondary nodes From a378189af6f211f9cafe133f632406c477082b1e Mon Sep 17 00:00:00 2001 From: Karoly Albert Szabo Date: Wed, 13 Mar 2019 18:06:11 +0100 Subject: [PATCH 03/12] Nice and readable sed --- .aws/first.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.aws/first.sh b/.aws/first.sh index 8af38f1813..d9002155c7 100644 --- a/.aws/first.sh +++ b/.aws/first.sh @@ -20,8 +20,7 @@ echo ${PASSWORD} | ./gaiacli keys add ${ACCOUNT} --home . > account_address.log echo ${PASSWORD} | ./gaiad gentx --name ${ACCOUNT} --home . --home-client . ./gaiad collect-gentxs --home . -MINT_CONFIG='{"minter":{"inflation":"0.000000001300000000","annual_provisions":"0.000000000000000000"},"params":{"mint_denom":"stake","inflation_rate_change":"0.130000000000000000","inflation_max":"0.000000002000000000","inflation_min":"0.000000000700000000","goal_bonded":"0.000000006700000000","blocks_per_year":"6311520"}}"' -jq '.app_state = ${MINT_CONFIG}' config/genesis.json > config/genesis.json +sed -i .bak -e 's/\"inflation\".*$/\"inflation\":\ \"0.000000001300000000\",/' -e 's/\"inflation_max\".*$/\"inflation_max\":\ \"0.000000002000000000\"/' -e 's/\"inflation_min\".*$/\"inflation_min\":\ \"0.000000000700000000\"/' -e 's/\"goal_bonded\".*$/\"goal_bonded\":\ \"0.000000006700000000\"/' ./genesis.json # Make our genesis avaialable to the secondary nodes aws s3 cp config/genesis.json s3://cosmos-gaia/genesis.json From 0e2677bba9f76a20a69c54cd70993e3fde00936e Mon Sep 17 00:00:00 2001 From: Karoly Albert Szabo Date: Wed, 13 Mar 2019 18:08:41 +0100 Subject: [PATCH 04/12] fix commas --- .aws/first.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.aws/first.sh b/.aws/first.sh index d9002155c7..cc873555e4 100644 --- a/.aws/first.sh +++ b/.aws/first.sh @@ -20,7 +20,7 @@ echo ${PASSWORD} | ./gaiacli keys add ${ACCOUNT} --home . > account_address.log echo ${PASSWORD} | ./gaiad gentx --name ${ACCOUNT} --home . --home-client . ./gaiad collect-gentxs --home . -sed -i .bak -e 's/\"inflation\".*$/\"inflation\":\ \"0.000000001300000000\",/' -e 's/\"inflation_max\".*$/\"inflation_max\":\ \"0.000000002000000000\"/' -e 's/\"inflation_min\".*$/\"inflation_min\":\ \"0.000000000700000000\"/' -e 's/\"goal_bonded\".*$/\"goal_bonded\":\ \"0.000000006700000000\"/' ./genesis.json +sed -i .bak -e 's/\"inflation\".*$/\"inflation\":\ \"0.000000001300000000\",/' -e 's/\"inflation_max\".*$/\"inflation_max\":\ \"0.000000002000000000\",/' -e 's/\"inflation_min\".*$/\"inflation_min\":\ \"0.000000000700000000\",/' -e 's/\"goal_bonded\".*$/\"goal_bonded\":\ \"0.000000006700000000\",/' ./genesis.json # Make our genesis avaialable to the secondary nodes aws s3 cp config/genesis.json s3://cosmos-gaia/genesis.json From 47f1e6f5a7d9938518f79c05be7bd50329226d56 Mon Sep 17 00:00:00 2001 From: Voyager Bot Date: Thu, 14 Mar 2019 10:20:50 +0100 Subject: [PATCH 05/12] easy connection to local full node --- README.md | 11 +++++++++++ package.json | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5e22056b95..e435f7360b 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,17 @@ Once you've generated a local account, run Voyager on the default `local-testnet yarn start ``` +### Run for a network of your choice + +Start a full node for the network that you want to connect to ([How to](https://cosmos.network/docs/gaia/join-mainnet.html#setting-up-a-new-node)). + + +Then start Cosmos Wallet without the local testnet: + +```bash +yarn frontend & yarn connect +``` + ## Testing If you would like to run all the tests you can run: diff --git a/package.json b/package.json index 038092cd02..92f72d1348 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,9 @@ "stargate": "./builds/Gaia/darwin_amd64/gaiacli rest-server --laddr 'tcp://localhost:9070' --home './builds/testnets/local-testnet/cli_home' --node 'http://localhost:26657' --chain-id 'local-testnet' --trust-node true", "frontend": "cross-env NODE_ENV=development FAUCET='http://localhost:8080' webpack-dev-server --hot --colors --config webpack.renderer.config.js --port 9080 --content-base app/dist --https --mode=development", "frontend:fixed-https": "yarn frontend --cert 'server_dev.crt' --key 'server_dev.key'", - "backend:new": "concurrently -k \"yarn stargate\" \"yarn proxy\" \"yarn nodes 2\"", - "backend": "concurrently -k \"yarn stargate\" \"yarn proxy\" \"yarn nodes 2 skip-rebuild\"", + "connect": "concurrently -k \"yarn stargate\" \"yarn proxy\"", + "backend:new": "concurrently -k \"yarn connect\" \"yarn nodes 2\"", + "backend": "concurrently -k \"yarn yarn connect\" \"yarn nodes 2 skip-rebuild\"", "backend:fixed-https": "concurrently -k \"yarn nodes 2 skip-rebuild\" \"yarn stargate --ssl-certfile 'server_dev.crt' --ssl-keyfile 'server_dev.key'\"" }, "devDependencies": { @@ -148,4 +149,4 @@ "vuelidate": "0.7.3", "vuex": "3.0.1" } -} +} \ No newline at end of file From 0bab2331f92b45994e35b64be038b232d5331894 Mon Sep 17 00:00:00 2001 From: Voyager Bot Date: Thu, 14 Mar 2019 10:21:22 +0100 Subject: [PATCH 06/12] pending --- PENDING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/PENDING.md b/PENDING.md index c0aa71afe5..116ac39615 100644 --- a/PENDING.md +++ b/PENDING.md @@ -6,6 +6,7 @@ ### Added - [\#1959](https://github.com/cosmos/voyager/issues/1959) display transactions on block page @fedekunze +- Added guide on how to connect via a local full node to any network @faboweb ### Changed From ea9025ff7fcf3a67ba22d4630416912fa0708b6e Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Thu, 14 Mar 2019 12:35:02 +0100 Subject: [PATCH 07/12] Update README.md Co-Authored-By: faboweb --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e435f7360b..30d0b7b726 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,7 @@ Once you've generated a local account, run Voyager on the default `local-testnet yarn start ``` -### Run for a network of your choice +### Set up Cosmos Wallet on a different network Start a full node for the network that you want to connect to ([How to](https://cosmos.network/docs/gaia/join-mainnet.html#setting-up-a-new-node)). From 89c9af9733a66dcc2565d1afba98d2940c4e58a7 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Thu, 14 Mar 2019 12:35:09 +0100 Subject: [PATCH 08/12] Update README.md Co-Authored-By: faboweb --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30d0b7b726..509db7a468 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ yarn start ### Set up Cosmos Wallet on a different network -Start a full node for the network that you want to connect to ([How to](https://cosmos.network/docs/gaia/join-mainnet.html#setting-up-a-new-node)). +Start a full node for the network that you want to connect to (See [guide](https://cosmos.network/docs/gaia/join-mainnet.html#setting-up-a-new-node)). Then start Cosmos Wallet without the local testnet: From 5d88333bbf60e1e53006578196ac3dd598abcb9d Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Thu, 14 Mar 2019 12:35:15 +0100 Subject: [PATCH 09/12] Update PENDING.md Co-Authored-By: faboweb --- PENDING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PENDING.md b/PENDING.md index 116ac39615..8eca1bde4c 100644 --- a/PENDING.md +++ b/PENDING.md @@ -6,9 +6,9 @@ ### Added - [\#1959](https://github.com/cosmos/voyager/issues/1959) display transactions on block page @fedekunze -- Added guide on how to connect via a local full node to any network @faboweb +- [\#2263](https://github.com/cosmos/voyager/pull/2263) Added guide on how to connect via a local full node to any network @faboweb ### Changed - Ignore changelog check on master @faboweb -- [#\2217](https://github.com/cosmos/voyager/issues/2217) Limit inputs to max precision @faboweb \ No newline at end of file +- [#\2217](https://github.com/cosmos/voyager/issues/2217) Limit inputs to max precision @faboweb From 013ed8d268b278c4a75c898aeae7135fb62b6e64 Mon Sep 17 00:00:00 2001 From: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Date: Thu, 14 Mar 2019 12:53:04 +0100 Subject: [PATCH 10/12] refactor some tests, remove onboarding tutorial & preferences (#2255) * refactor tests, remove onboarding, fix error collection * fixed tabs settings * coverage * pending * Update PagePreferences.vue * test timer * altered tests * removed page preferences; closes #2259 --- PENDING.md | 16 ++ .../renderer/components/common/AnchorCopy.vue | 60 -------- .../renderer/components/common/Page404.vue | 5 + .../components/common/PagePreferences.vue | 73 --------- .../renderer/components/common/TmField.vue | 17 +- .../renderer/components/common/TmLiCopy.vue | 49 ------ .../renderer/components/common/ToolBar.vue | 3 - app/src/renderer/routes.js | 6 - app/src/renderer/vuex/getters.js | 1 - app/src/renderer/vuex/modules/index.js | 1 - app/src/renderer/vuex/modules/onboarding.js | 41 ----- app/src/renderer/vuex/modules/session.js | 6 +- test/e2e/common.js | 11 +- test/e2e/preferences.js | 25 --- .../specs/components/common/Page404.spec.js | 10 +- .../components/common/PagePreferences.spec.js | 60 -------- .../components/common/ShortBech32.spec.js | 20 +-- .../specs/components/common/TmField.spec.js | 23 +++ .../common/__snapshots__/Page404.spec.js.snap | 145 ++++++++---------- .../PagePreferences.spec.js.snap | 43 ------ .../__snapshots__/ShortBech32.spec.js.snap | 28 +++- .../common/__snapshots__/TmField.spec.js.snap | 84 ++++++++++ .../common/__snapshots__/ToolBar.spec.js.snap | 11 -- .../__snapshots__/PageGovernance.spec.js.snap | 22 --- test/unit/specs/store/onboarding.spec.js | 42 ----- 25 files changed, 252 insertions(+), 550 deletions(-) delete mode 100644 app/src/renderer/components/common/AnchorCopy.vue delete mode 100644 app/src/renderer/components/common/PagePreferences.vue delete mode 100644 app/src/renderer/components/common/TmLiCopy.vue delete mode 100644 app/src/renderer/vuex/modules/onboarding.js delete mode 100644 test/e2e/preferences.js delete mode 100644 test/unit/specs/components/common/PagePreferences.spec.js delete mode 100644 test/unit/specs/components/common/__snapshots__/PagePreferences.spec.js.snap delete mode 100644 test/unit/specs/store/onboarding.spec.js diff --git a/PENDING.md b/PENDING.md index e69de29bb2..40175cd537 100644 --- a/PENDING.md +++ b/PENDING.md @@ -0,0 +1,16 @@ +### Fixed + +- [#\2188](https://github.com/cosmos/voyager/issues/2188) Fixed issues with the way we were loading PageNetwork @jbibla +- [#\2246](https://github.com/cosmos/voyager/issues/2246) Fix from moniker not visible on withdraw txs @faboweb + +### Added + +- [\#1959](https://github.com/cosmos/voyager/issues/1959) display transactions on block page @fedekunze + +### Changed + +- [\#2255](https://github.com/cosmos/voyager/pull/2255) removed onboarding tutorial @fedekunze +- [\#2259](https://github.com/cosmos/voyager/issues/2259) removed PagePreferences @fedekunze +- [\#1337](https://github.com/cosmos/voyager/issues/1337) refactor unit tests: Page404, ShortBech32 @fedekunze +- Ignore changelog check on master @faboweb +- [#\2217](https://github.com/cosmos/voyager/issues/2217) Limit inputs to max precision @faboweb diff --git a/app/src/renderer/components/common/AnchorCopy.vue b/app/src/renderer/components/common/AnchorCopy.vue deleted file mode 100644 index 8385f7a9cb..0000000000 --- a/app/src/renderer/components/common/AnchorCopy.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - diff --git a/app/src/renderer/components/common/Page404.vue b/app/src/renderer/components/common/Page404.vue index fc360313ad..0d6821f92d 100644 --- a/app/src/renderer/components/common/Page404.vue +++ b/app/src/renderer/components/common/Page404.vue @@ -9,6 +9,11 @@ + + `; diff --git a/test/unit/specs/components/common/__snapshots__/PagePreferences.spec.js.snap b/test/unit/specs/components/common/__snapshots__/PagePreferences.spec.js.snap deleted file mode 100644 index 637acf6d16..0000000000 --- a/test/unit/specs/components/common/__snapshots__/PagePreferences.spec.js.snap +++ /dev/null @@ -1,43 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`PagePreferences has the expected html structure if connected 1`] = ` - - - - - http://localhost:9070 - - - - - - - - - - - - -`; diff --git a/test/unit/specs/components/common/__snapshots__/ShortBech32.spec.js.snap b/test/unit/specs/components/common/__snapshots__/ShortBech32.spec.js.snap index 94ba75b264..31421eaaa5 100644 --- a/test/unit/specs/components/common/__snapshots__/ShortBech32.spec.js.snap +++ b/test/unit/specs/components/common/__snapshots__/ShortBech32.spec.js.snap @@ -1,7 +1,29 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ShortBech32 has the expected html structure 1`] = ` -"
+exports[`ShortBech32 should show a short address 1`] = ` +
+
+ cosmosftw…6789 -
checkCopied
" + +
+ +
+ + check + + + Copied + +
+
`; diff --git a/test/unit/specs/components/common/__snapshots__/TmField.spec.js.snap b/test/unit/specs/components/common/__snapshots__/TmField.spec.js.snap index 8eb853520e..7a7d9220c1 100644 --- a/test/unit/specs/components/common/__snapshots__/TmField.spec.js.snap +++ b/test/unit/specs/components/common/__snapshots__/TmField.spec.js.snap @@ -7,6 +7,90 @@ exports[`TmField allows for style customization 1`] = ` /> `; +exports[`TmField displays a disabled toggle 1`] = ` +
+ + + bad + + + +
+
+ cool +
+
+ +
+
+ bad +
+
+ +
+ + +
+ +`; + +exports[`TmField displays a disabled toggle 2`] = ` +
+ + + bad + + + +
+
+ cool +
+
+ +
+
+ bad +
+
+ +
+ + +
+ +`; + exports[`TmField displays a number input 1`] = ` - - - settings - - -
diff --git a/test/unit/specs/components/governance/__snapshots__/PageGovernance.spec.js.snap b/test/unit/specs/components/governance/__snapshots__/PageGovernance.spec.js.snap index 179af6b56b..071cf850e0 100644 --- a/test/unit/specs/components/governance/__snapshots__/PageGovernance.spec.js.snap +++ b/test/unit/specs/components/governance/__snapshots__/PageGovernance.spec.js.snap @@ -28,17 +28,6 @@ exports[`PageGovernance disables proposal creation if not connected 1`] = ` > - - - settings - - - @@ -150,17 +139,6 @@ exports[`PageGovernance has the expected html structure 1`] = ` > - - - settings - - - diff --git a/test/unit/specs/store/onboarding.spec.js b/test/unit/specs/store/onboarding.spec.js deleted file mode 100644 index ca2568b956..0000000000 --- a/test/unit/specs/store/onboarding.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import setup from "../../helpers/vuex-setup" - -const instance = setup() - -describe(`Module: Onboarding`, () => { - let store, state - - beforeEach(() => { - store = instance.shallow().store - state = store.state.onboarding - }) - - it(`toggles onboarding active state`, () => { - expect(state.active).toBe(false) - store.commit(`setOnboardingActive`, false) - expect(state.active).toBe(false) - store.commit(`setOnboardingActive`, true) - expect(state.active).toBe(true) - }) - - it(`toggles onboarding state`, () => { - expect(state.state).toBe(0) - store.commit(`setOnboardingState`, 3) - expect(state.state).toBe(3) - store.commit(`setOnboardingState`, 0) - expect(state.state).toBe(0) - }) - - it(`loads the onboarding active state from localStorage`, () => { - store.commit(`setOnboardingActive`, false) - state.active = true - store.commit(`loadOnboarding`) - expect(state.active).toBe(false) - }) - - it(`loads the onboarding state from localStorage`, () => { - store.commit(`setOnboardingState`, 3) - state.state = 1 - store.commit(`loadOnboarding`) - expect(state.state).toBe(3) - }) -}) From de369e3be720a26b55f69e12c0a751a73bf55680 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 14 Mar 2019 12:56:16 +0100 Subject: [PATCH 11/12] Fabo/ fixed PageValidator console errors (#2257) * fixed * fixed tests * Update PENDING.md thx Co-Authored-By: faboweb --- PENDING.md | 1 + .../components/staking/PageValidator.vue | 15 +- .../components/staking/PageValidator.spec.js | 2 +- .../__snapshots__/PageValidator.spec.js.snap | 1557 +++++++++-------- 4 files changed, 794 insertions(+), 781 deletions(-) diff --git a/PENDING.md b/PENDING.md index 40175cd537..465adfeb5f 100644 --- a/PENDING.md +++ b/PENDING.md @@ -2,6 +2,7 @@ - [#\2188](https://github.com/cosmos/voyager/issues/2188) Fixed issues with the way we were loading PageNetwork @jbibla - [#\2246](https://github.com/cosmos/voyager/issues/2246) Fix from moniker not visible on withdraw txs @faboweb +- [\#2257](https://github.com/cosmos/voyager/pull/2257) fixed console error on page validator if loading the page from URL @faboweb ### Added diff --git a/app/src/renderer/components/staking/PageValidator.vue b/app/src/renderer/components/staking/PageValidator.vue index e804f6b90a..696e813344 100644 --- a/app/src/renderer/components/staking/PageValidator.vue +++ b/app/src/renderer/components/staking/PageValidator.vue @@ -1,8 +1,13 @@