From 97dee2e1a0e793f6fb47abacb3709a6a72b981a7 Mon Sep 17 00:00:00 2001 From: Tommy Date: Mon, 8 Nov 2021 14:54:01 +0000 Subject: [PATCH 1/4] Fix path for github action running tauri-wallet-tests . Applied prettier to the code base . Removed delegation to gateway tests --- tauri-wallet/webdriver/.prettierrc.json | 1 + tauri-wallet/webdriver/README.md | 75 +++++----- tauri-wallet/webdriver/babel.config.js | 22 +-- .../common/constants/text-constants.js | 52 +++---- .../webdriver/common/data/user-data.json | 16 +-- .../webdriver/common/helpers/helper.js | 72 +++++----- tauri-wallet/webdriver/package.json | 6 +- .../webdriver/tests/pages/wallet.bond.js | 62 +++++--- .../webdriver/tests/pages/wallet.create.js | 32 +++-- .../webdriver/tests/pages/wallet.delegate.js | 76 +++++++--- .../webdriver/tests/pages/wallet.homepage.js | 54 +++++-- .../webdriver/tests/pages/wallet.login.js | 43 ++++-- .../webdriver/tests/pages/wallet.receive.js | 49 ++++--- .../webdriver/tests/pages/wallet.send.js | 68 ++++++--- .../tests/pages/wallet.undelegate.js | 28 ++-- .../specs/existinguser/test.wallet.bond.js | 87 ++++++----- .../existinguser/test.wallet.delegate.js | 136 ++++++++++-------- .../specs/existinguser/test.wallet.home.js | 56 ++++---- .../specs/existinguser/test.wallet.receive.js | 41 +++--- .../specs/existinguser/test.wallet.send.js | 72 +++++----- .../existinguser/test.wallet.undelegate.js | 46 +++--- .../tests/specs/newuser/test.wallet.create.js | 55 +++---- tauri-wallet/webdriver/wdio.conf.cjs | 67 +++++---- 23 files changed, 707 insertions(+), 509 deletions(-) create mode 100644 tauri-wallet/webdriver/.prettierrc.json diff --git a/tauri-wallet/webdriver/.prettierrc.json b/tauri-wallet/webdriver/.prettierrc.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/tauri-wallet/webdriver/.prettierrc.json @@ -0,0 +1 @@ +{} diff --git a/tauri-wallet/webdriver/README.md b/tauri-wallet/webdriver/README.md index e527f85835..9fda6fc032 100644 --- a/tauri-wallet/webdriver/README.md +++ b/tauri-wallet/webdriver/README.md @@ -5,75 +5,82 @@ SPDX-License-Identifier: Apache-2.0 # Nym Wallet Webdriverio testsuite -A webdriverio test suite implementation using tauri driver +A webdriverio test suite implementation using tauri driver with a page object model design. This is to provide quick iterative feedback on the UI of the nym wallet. Currently, tauri-driver is available to run on Windows and Linux machines. -## Installation prerequisites -* `Yarn` -* `NodeJS >= v16.8.0` -* `Rust & cargo >= v1.51` -* `tauri-driver` -* `That you have an existing mnemonic and you can login to the app` -* `Have the details listed below to provide the user-data.json file` +## Installation prerequisites +- `Yarn` +- `NodeJS >= v16.8.0` +- `Rust & cargo >= v1.51` +- `tauri-driver` +- `That you have an existing mnemonic and you can login to the app` +- `Have the details listed below to provide the user-data.json file` ## Key Information -* Please read the instructions on the `nym/tauri-wallet/README.md` in the root of the project on how to build the application -* Please ensure you have the relevant Webdriver kits installed on your machine - + +- Please read the instructions on the `nym/tauri-wallet/README.md` in the root of the project on how to build the application +- Please ensure you have the relevant Webdriver kits installed on your machine - + ``` linux: - sudo apt-get install -y webkit2gtk-driver - ``` - ``` - windows: + sudo apt-get install -y webkit2gtk-driver +``` + +``` +windows: download msedgedriver.exe from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ ``` -please visit [Tauri Studio](https://tauri.studio/en/docs/usage/guides/webdriver/introduction), this will specify the additional drivers you need -* The path to run the application is set in the `wdio.conf.js` which lives in the root directory -* Before running the suite you need to build the application and check that the application has -built successfully, if so, you will have an executable sitting in the target directory in `tauri-wallet/target/*/nym_wallet` (refer to point 1) -* The suite will not be able to detect elements on screen if you select a release build, however you can run tests against a release target +please visit [Tauri Studio](https://tauri.studio/en/docs/usage/guides/webdriver/introduction), this will specify the additional drivers you need + +- The path to run the application is set in the `wdio.conf.js` which lives in the root directory +- Before running the suite you need to build the application and check that the application has + built successfully, if so, you will have an executable sitting in the target directory in `tauri-wallet/target/*/nym_wallet` (refer to point 1) +- The suite will not be able to detect elements on screen if you select a release build, however you can run tests against a release target ## Installation & usage -* `test excution happens inside /webdriver directory` -* `test data needs to be provided inside the user-data.json` -* `check the wdio.conf.cjs to see the test execution along with the path location of the binary` + +- `test excution happens inside /webdriver directory` +- `test data needs to be provided inside the user-data.json` +- `check the wdio.conf.cjs to see the test execution along with the path location of the binary` + ``` -example: +example: //mnemonic is a base64 enconded value, which is your 24 character passphrase, these values are for illustration purposes - { - "mnemonic" : "dGhpcyBpcyBhIHBhc3NwaHJhc2UK", - "punk_address" : "punk1f3dzkhmunma5ze5q952daxca6371989189", - "receiver_address" : "punk1p0ce82jxxglpmutvhq4mdwgcwf4avm5n1821982", + { + "mnemonic" : "dGhpcyBpcyBhIHBhc3NwaHJhc2UK", + "punk_address" : "punk1f3dzkhmunma5ze5q952daxca6371989189", + "receiver_address" : "punk1p0ce82jxxglpmutvhq4mdwgcwf4avm5n1821982", "amount_to_send" : "1", "identity_key_to_delegate_mix_node": "value", "identity_key_to_delegate_gateway" : "value", "delegate_amount" : "1" } ``` -* `yarn test:runall` - the first test run will take some time to spin up be patient -* You can run tests individually by passing through the script situated in the package.json for example `yarn test:newuser` + +- `yarn test:runall` - the first test run will take some time to spin up be patient +- You can run tests individually by passing through the script situated in the package.json for example `yarn test:newuser` Tests are categorised and run by their pages, they follow a sequential flow, if one test case fails before the next execution it may derail the next test. //todo improve in near future ## Test reporting + Currently the tests use allure reporting, the configuration can be altered in the `wdio.conf.cjs`. At present it takes snapshots of any failing tests, the test output run can be seen in the allure-results directory Tests ouput: -* -* + +- +- If any tests fail in their test run it will produce the stack trace error along with the test in question ## TODO -*Disclaimer*: Still WIP - +_Disclaimer_: Still WIP Implement error handling/ beforeTest() - validating json file exists with data for test execution - Currently this is dev'd against a Linux based OS, not tested against windows yet. diff --git a/tauri-wallet/webdriver/babel.config.js b/tauri-wallet/webdriver/babel.config.js index 8073490996..723cec7c52 100644 --- a/tauri-wallet/webdriver/babel.config.js +++ b/tauri-wallet/webdriver/babel.config.js @@ -1,12 +1,12 @@ module.exports = { - "presets": [ - [ - "@babel/preset-env", - { - "targets": { - "node": "14" - } - } - ] - ] -} \ No newline at end of file + presets: [ + [ + "@babel/preset-env", + { + targets: { + node: "14", + }, + }, + ], + ], +}; diff --git a/tauri-wallet/webdriver/common/constants/text-constants.js b/tauri-wallet/webdriver/common/constants/text-constants.js index 09e19ba685..843e4922e6 100644 --- a/tauri-wallet/webdriver/common/constants/text-constants.js +++ b/tauri-wallet/webdriver/common/constants/text-constants.js @@ -1,28 +1,30 @@ module.exports = { - //receivePage - "recievePageInformation" : "You can receive tokens by providing this address to the sender", - "receivePageHeaderText": "Receive Nym", - - //sendPage - "sendPunk" : "Send PUNK", + //receivePage + recievePageInformation: + "You can receive tokens by providing this address to the sender", + receivePageHeaderText: "Receive Nym", - //homePage - "homePageErrorMnemonic": "Error parsing bip39 mnemonic", - "homePageSignIn" : "Sign in", - "createOne" : "Create one", - "walletSuccess" : "Please store your mnemonic in a safe place. You'll need it to access your wallet", - - //bondPage // unbondPage - "bondAlreadyNoded" : "Looks like you already have a mixnode bonded.", - "bondNodeHeaderText": "Bond a node or gateway", - "unbondNodeHeaderText" : "Unbond a mixnode or gateway", - "unbondMixNodeText": "Looks like you already have a mixnode bonded.", - "unbondMixNode": "UNBOND", + //sendPage + sendPunk: "Send PUNK", - //delegatePage // undelegatePage - "delegateHeaderText" : "Delegate\nDelegate to mixnode or gateway", - "nodeIdentityValidationText" : "identity is a required field", - "amountValidationText": "amount is a required field", - "undelegateHeaderText" : "Undelegate from a mixnode or gateway", - "delegationComplete" : "Delegation complete" -} \ No newline at end of file + //homePage + homePageErrorMnemonic: "Error parsing bip39 mnemonic", + homePageSignIn: "Sign in", + createOne: "Create one", + walletSuccess: + "Please store your mnemonic in a safe place. You'll need it to access your wallet", + + //bondPage // unbondPage + bondAlreadyNoded: "Looks like you already have a mixnode bonded.", + bondNodeHeaderText: "Bond a node or gateway", + unbondNodeHeaderText: "Unbond a mixnode or gateway", + unbondMixNodeText: "Looks like you already have a mixnode bonded.", + unbondMixNode: "UNBOND", + + //delegatePage // undelegatePage + delegateHeaderText: "Delegate\nDelegate to mixnode", + nodeIdentityValidationText: "identity is a required field", + amountValidationText: "amount is a required field", + undelegateHeaderText: "Undelegate from a mixnode or gateway", + delegationComplete: "Delegation complete", +}; diff --git a/tauri-wallet/webdriver/common/data/user-data.json b/tauri-wallet/webdriver/common/data/user-data.json index 92096f442b..4b4b4afa0b 100644 --- a/tauri-wallet/webdriver/common/data/user-data.json +++ b/tauri-wallet/webdriver/common/data/user-data.json @@ -1,9 +1,9 @@ { - "mnemonic": "value", - "punk_address": "", - "receiver_address": "", - "amount_to_send": "", - "identity_key_to_delegate_mix_node": "", - "identity_key_to_delegate_gateway" : "", - "delegate_amount": "" -} \ No newline at end of file + "mnemonic": "value", + "punk_address": "", + "receiver_address": "", + "amount_to_send": "", + "identity_key_to_delegate_mix_node": "", + "identity_key_to_delegate_gateway": "", + "delegate_amount": "" +} diff --git a/tauri-wallet/webdriver/common/helpers/helper.js b/tauri-wallet/webdriver/common/helpers/helper.js index 0781de5ece..7f8ac61385 100644 --- a/tauri-wallet/webdriver/common/helpers/helper.js +++ b/tauri-wallet/webdriver/common/helpers/helper.js @@ -1,45 +1,43 @@ class Helpers { + //helper to decode mnemonic so plain 24 character passphrase isn't in sight albeit it is presented when ruunning the scripts + //maybe a show passphrase toggle button? + decodeBase = async (input) => { + var m = Buffer.from(input, "base64").toString(); + return m; + }; - //helper to decode mnemonic so plain 24 character passphrase isn't in sight albeit it is presented when ruunning the scripts - //maybe a show passphrase toggle button? - decodeBase = async (input) => { - var m = Buffer.from(input, 'base64').toString() - return m + navigateAndClick = async (element) => { + await element.click(); + }; + + scrollIntoView = async (element) => { + await element.scrollIntoView(); + }; + + currentBalance = async (value) => { + return parseFloat(value.split(/\s+/)[0].toString()).toFixed(5); + }; + + //todo need to improve calculation - WIP + calculateFees = async (beforeBalance, transactionFee, amount, isSend) => { + let fee; + + if (isSend) { + //send transaction + fee = transactionFee.split(/\s+/)[0]; + } else { + //delegate transaction + fee = transactionFee.split(/\s+/)[3]; } - navigateAndClick = async (element) => { - await element.click() - } + const currentBalance = beforeBalance.split(/\s+/)[0]; - scrollIntoView = async (element) => { - await element.scrollIntoView() - } + const castCurrentBalance = parseFloat(currentBalance).toFixed(5); + const transCost = +parseFloat(amount) + +parseFloat(fee).toFixed(5); - - currentBalance = async (value) => { - return parseFloat(value.split(/\s+/)[0].toString()).toFixed(5) - } - - //todo need to improve calculation - WIP - calculateFees = async (beforeBalance, transactionFee, amount, isSend) => { - let fee - - if (isSend) { - //send transaction - fee = transactionFee.split(/\s+/)[0] - } else { - //delegate transaction - fee = transactionFee.split(/\s+/)[3] - } - - const currentBalance = beforeBalance.split(/\s+/)[0] - - const castCurrentBalance = parseFloat(currentBalance).toFixed(5) - const transCost = +parseFloat(amount) + +parseFloat(fee).toFixed(5) - - let sum = parseFloat(castCurrentBalance) - parseFloat(transCost) - return sum.toFixed(5) - } + let sum = parseFloat(castCurrentBalance) - parseFloat(transCost); + return sum.toFixed(5); + }; } -module.exports = new Helpers() \ No newline at end of file +module.exports = new Helpers(); diff --git a/tauri-wallet/webdriver/package.json b/tauri-wallet/webdriver/package.json index 1adaaab495..bc309a7574 100644 --- a/tauri-wallet/webdriver/package.json +++ b/tauri-wallet/webdriver/package.json @@ -9,7 +9,8 @@ "test:home": "wdio run wdio.conf.cjs --suite home", "test:bond": "wdio run wdio.conf.cjs --suite bond", "test:delegate": "wdio run wdio.conf.cjs --suite delegate", - "test:newuser": "wdio run wdio.conf.cjs --suite newuser" + "test:newuser": "wdio run wdio.conf.cjs --suite newuser", + "run:prettier": "prettier --write ." }, "dependencies": { "@types/node": "^16.11.0", @@ -20,6 +21,7 @@ "devDependencies": { "@wdio/local-runner": "^7.14.1", "@wdio/mocha-framework": "^7.14.1", - "@wdio/spec-reporter": "^7.14.1" + "@wdio/spec-reporter": "^7.14.1", + "prettier": "2.4.1" } } diff --git a/tauri-wallet/webdriver/tests/pages/wallet.bond.js b/tauri-wallet/webdriver/tests/pages/wallet.bond.js index 10e437caba..40a9066c6a 100644 --- a/tauri-wallet/webdriver/tests/pages/wallet.bond.js +++ b/tauri-wallet/webdriver/tests/pages/wallet.bond.js @@ -1,20 +1,48 @@ class WalletBond { - - get header() { return $("#root > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div.MuiCardHeader-root > div > span.MuiTypography-root.MuiCardHeader-subheader.MuiTypography-subtitle1.MuiTypography-colorTextSecondary.MuiTypography-displayBlock") } - get identityKey() { return $("#identityKey") } - get sphinxKey() { return $("#sphinxKey") } - get amountToBond() { return $("#amount") } - get hostInput() { return $("#host") } - get versionInput() { return $("version") } - get selectAdvancedOptions() { return $("[type='checkbox']") } - get mixPort() { return $("#mixPort") } - get verlocPort() { return $("#verlocPort") } - get httpApiPort() { return $("#httpApiPort") } - get bondButton() { return $("[data-testid='bond-button']") } - get unBondButton() { return $("[data-testid='un-bond']") } - get unBond() { return $("[data-testid='bond-noded']") } - get unBondWarning() {return $("div.MuiAlert-message")} - + get header() { + return $( + "#root > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div.MuiCardHeader-root > div > span.MuiTypography-root.MuiCardHeader-subheader.MuiTypography-subtitle1.MuiTypography-colorTextSecondary.MuiTypography-displayBlock" + ); + } + get identityKey() { + return $("#identityKey"); + } + get sphinxKey() { + return $("#sphinxKey"); + } + get amountToBond() { + return $("#amount"); + } + get hostInput() { + return $("#host"); + } + get versionInput() { + return $("version"); + } + get selectAdvancedOptions() { + return $("[type='checkbox']"); + } + get mixPort() { + return $("#mixPort"); + } + get verlocPort() { + return $("#verlocPort"); + } + get httpApiPort() { + return $("#httpApiPort"); + } + get bondButton() { + return $("[data-testid='bond-button']"); + } + get unBondButton() { + return $("[data-testid='un-bond']"); + } + get unBond() { + return $("[data-testid='bond-noded']"); + } + get unBondWarning() { + return $("div.MuiAlert-message"); + } } -module.exports = new WalletBond() \ No newline at end of file +module.exports = new WalletBond(); diff --git a/tauri-wallet/webdriver/tests/pages/wallet.create.js b/tauri-wallet/webdriver/tests/pages/wallet.create.js index 13f5dd6bd8..25f82ec81f 100644 --- a/tauri-wallet/webdriver/tests/pages/wallet.create.js +++ b/tauri-wallet/webdriver/tests/pages/wallet.create.js @@ -1,12 +1,24 @@ class WalletCreate { - - get createAccount() { return $("[href='#']") } - get create() { return $("[data-testid='create-button']") } - get accountCreatedSuccessfully() { return $("[data-testid='mnemonic-warning']") } - get walletMnemonicValue() { return $("[data-testid='mnemonic-phrase']") } - get punkAddress() { return $("[data-testid='wallet-address']") } - get backToSignIn() { return $("[data-testid='sign-in-button']") } - get signInButton() { return $("[type='submit']") } - + get createAccount() { + return $("[href='#']"); + } + get create() { + return $("[data-testid='create-button']"); + } + get accountCreatedSuccessfully() { + return $("[data-testid='mnemonic-warning']"); + } + get walletMnemonicValue() { + return $("[data-testid='mnemonic-phrase']"); + } + get punkAddress() { + return $("[data-testid='wallet-address']"); + } + get backToSignIn() { + return $("[data-testid='sign-in-button']"); + } + get signInButton() { + return $("[type='submit']"); + } } -module.exports = new WalletCreate() \ No newline at end of file +module.exports = new WalletCreate(); diff --git a/tauri-wallet/webdriver/tests/pages/wallet.delegate.js b/tauri-wallet/webdriver/tests/pages/wallet.delegate.js index b19196b6a6..7ef8563a6f 100644 --- a/tauri-wallet/webdriver/tests/pages/wallet.delegate.js +++ b/tauri-wallet/webdriver/tests/pages/wallet.delegate.js @@ -1,26 +1,60 @@ class WalletDelegate { - - get header() { return $("[data-testid='Delegate']") } - get nodeIdentity() { return $("#identity") } - get amountToDelegate() { return $("#amount") } - get identityValidation() { return $("#identity-helper-text") } - get amountToDelegateValidation() { return $("#amount-helper-text") } - get delegateStakeButton() { return $("[data-testid='delegate-button']") } - get mixNodeRadioButton() { return $("[data-testid='mix-node']") } - get gateWayRadioButton() { return $("[data-testid='gate-way']") } - get successfullyDelegate() { return $("[data-testid='delegate-success']") } - get finishButton() { return $("[data-testid='finish-button']") } - get transactionFeeAmount() { return $("[data-testid='fee-amount']") } - get accountBalance() { return $("[data-testid='account-balance']") } + get header() { + return $("[data-testid='Delegate']"); + } + get nodeIdentity() { + return $("#identity"); + } + get amountToDelegate() { + return $("#amount"); + } + get identityValidation() { + return $("#identity-helper-text"); + } + get amountToDelegateValidation() { + return $("#amount-helper-text"); + } + get delegateStakeButton() { + return $("[data-testid='delegate-button']"); + } + get mixNodeRadioButton() { + return $("[data-testid='mix-node']"); + } + get gateWayRadioButton() { + return $("[data-testid='gate-way']"); + } + get successfullyDelegate() { + return $("[data-testid='delegate-success']"); + } + get finishButton() { + return $("[data-testid='finish-button']"); + } + get transactionFeeAmount() { + return $("[data-testid='fee-amount']"); + } + get accountBalance() { + return $("[data-testid='account-balance']"); + } //Undelegate - get unDelegateHeader() { return $("[data-testid='Undelegate']") } - get unNodeIdentity() { return $("[name='identity']") } - get unDelegateFeeText() { return $("[data-testid='fee-amount']") } - get unDelegateGatewayRadioButton() { return $("[data-testid='gate-way']") } - get unMixNodeRadioButton() { return $("[data-testid='mix-node']") } - get unDelegateButton() { return $("[data-testid='submit-button']") } - + get unDelegateHeader() { + return $("[data-testid='Undelegate']"); + } + get unNodeIdentity() { + return $("[name='identity']"); + } + get unDelegateFeeText() { + return $("[data-testid='fee-amount']"); + } + get unDelegateGatewayRadioButton() { + return $("[data-testid='gate-way']"); + } + get unMixNodeRadioButton() { + return $("[data-testid='mix-node']"); + } + get unDelegateButton() { + return $("[data-testid='submit-button']"); + } } -module.exports = new WalletDelegate() \ No newline at end of file +module.exports = new WalletDelegate(); diff --git a/tauri-wallet/webdriver/tests/pages/wallet.homepage.js b/tauri-wallet/webdriver/tests/pages/wallet.homepage.js index c4681daf3a..23012c7c2c 100644 --- a/tauri-wallet/webdriver/tests/pages/wallet.homepage.js +++ b/tauri-wallet/webdriver/tests/pages/wallet.homepage.js @@ -1,18 +1,42 @@ class WalletHome { - - get balanceCheck() { return $("#root > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div.MuiCardHeader-root > div > span") } - get punkBalance() { return $("") } - get punkAddress() { return $("[data-testid='wallet-address']") } - get accountBalance() { return $("[data-testid='account-balance']") } - get balanceButton() { return $("[href='/balance']") } - get sendButton() { return $("[href='/send']"); } - get receiveButton() { return $("[href='/receive']") } - get bondButton() { return $("[href='/bond']") } - get unBondButton() { return $("[href='/unbond']") } - get delegateButton() { return $("[href='/delegate']") } - get unDelegateButton() { return $("[href='/undelegate']") } - get logOutButton() { return $("[data-testid='log-out']") } - + get balanceCheck() { + return $( + "#root > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div.MuiCardHeader-root > div > span" + ); + } + get punkBalance() { + return $(""); + } + get punkAddress() { + return $("[data-testid='wallet-address']"); + } + get accountBalance() { + return $("[data-testid='account-balance']"); + } + get balanceButton() { + return $("[href='/balance']"); + } + get sendButton() { + return $("[href='/send']"); + } + get receiveButton() { + return $("[href='/receive']"); + } + get bondButton() { + return $("[href='/bond']"); + } + get unBondButton() { + return $("[href='/unbond']"); + } + get delegateButton() { + return $("[href='/delegate']"); + } + get unDelegateButton() { + return $("[href='/undelegate']"); + } + get logOutButton() { + return $("[data-testid='log-out']"); + } } -module.exports = new WalletHome() \ No newline at end of file +module.exports = new WalletHome(); diff --git a/tauri-wallet/webdriver/tests/pages/wallet.login.js b/tauri-wallet/webdriver/tests/pages/wallet.login.js index f67d003bd9..92cd3d848a 100644 --- a/tauri-wallet/webdriver/tests/pages/wallet.login.js +++ b/tauri-wallet/webdriver/tests/pages/wallet.login.js @@ -1,18 +1,31 @@ class WalletLogin { + get signInLabel() { + return $("[data-testid='sign-in']"); + } + get mnemonic() { + return $("#mnemonic"); + } + get signInButton() { + return $("[type='submit']"); + } + get errorValidation() { + return $("[class='MuiAlert-message']"); + } + get accountBalance() { + return $("[data-test-id='account-balance']"); + } + get accountBalanceText() { + return $("[class='MuiAlert-message']"); + } + get walletAddress() { + return $("[data-testid='wallet-address']"); + } - get signInLabel() {return $("[data-testid='sign-in']")} - get mnemonic() { return $("#mnemonic")} - get signInButton() {return $("[type='submit']") } - get errorValidation() {return $("[class='MuiAlert-message']") } - get accountBalance() {return $("[data-test-id='account-balance']")} - get accountBalanceText() {return $("[class='MuiAlert-message']")} - get walletAddress() {return $("[data-testid='wallet-address']")} - - //login to the application - enterMnemonic = async(mnemonic) => { - await this.mnemonic.addValue(mnemonic); - await this.signInButton.click(); - await this.accountBalance.isExisting(); - } + //login to the application + enterMnemonic = async (mnemonic) => { + await this.mnemonic.addValue(mnemonic); + await this.signInButton.click(); + await this.accountBalance.isExisting(); + }; } -module.exports = new WalletLogin() \ No newline at end of file +module.exports = new WalletLogin(); diff --git a/tauri-wallet/webdriver/tests/pages/wallet.receive.js b/tauri-wallet/webdriver/tests/pages/wallet.receive.js index bf736df46d..f7c27f1118 100644 --- a/tauri-wallet/webdriver/tests/pages/wallet.receive.js +++ b/tauri-wallet/webdriver/tests/pages/wallet.receive.js @@ -1,24 +1,37 @@ class WalletReceive { + get receiveNymHeader() { + return $( + "#root > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div.MuiCardHeader-root > div > span" + ); + } + get receiveNymText() { + return $("[data-testid='receive-nym']"); + } + get walletAddress() { + return $("[data-testid='client-address']"); + } + get copyButton() { + return $("[data-testid='copy-button']"); + } + get qrCode() { + return $("[data-testid='qr-code']"); + } - get receiveNymHeader() { return $("#root > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div.MuiCardHeader-root > div > span") } - get receiveNymText() { return $("[data-testid='receive-nym']") } - get walletAddress() { return $("[data-testid='client-address']"); } - get copyButton() { return $("[data-testid='copy-button']") } - get qrCode() { return $("[data-testid='qr-code']") } + WaitForButtonChangeOnCopy = async () => { + await this.copyButton.click(); - WaitForButtonChangeOnCopy = async () => { - await this.copyButton.click() - - await this.copyButton.waitForDisplayed({ timeout: 1500 }) - - await this.copyButton.waitUntil(async function () { - return (await this.getText()) === 'COPIED' - }, { - timeout: 1500, - timeoutMsg: 'expected text to be different after 1.5s' - }) - } + await this.copyButton.waitForDisplayed({ timeout: 1500 }); + await this.copyButton.waitUntil( + async function () { + return (await this.getText()) === "COPIED"; + }, + { + timeout: 1500, + timeoutMsg: "expected text to be different after 1.5s", + } + ); + }; } -module.exports = new WalletReceive() \ No newline at end of file +module.exports = new WalletReceive(); diff --git a/tauri-wallet/webdriver/tests/pages/wallet.send.js b/tauri-wallet/webdriver/tests/pages/wallet.send.js index 8c11550a6a..51f26dce98 100644 --- a/tauri-wallet/webdriver/tests/pages/wallet.send.js +++ b/tauri-wallet/webdriver/tests/pages/wallet.send.js @@ -1,22 +1,52 @@ class WalletSend { - - get fromAddress() { return $("#from") } - get toAddress() { return $("#to") } - get amount() { return $("#amount") } - get nextButton() { return $("[data-testid='button") } - get sendHeader() { return $("[data-testid='Send PUNK']") } - get accountBalance() { return $("[data-testid='account-balance']") } - get amountReviewAndSend() { return $("[data-testid='Amount']") } - get toAddressReviewAndSend() { return $("[data-testid='To']") } - get fromAddressReviewAndSend() { return $("[data-testid='From']") } - get transferFeeAmount() { return $("[data-testid='Transfer fee']") } - get reviewAndSendBackButton() { return $("[data-testid='back-button']") } - get sendButton() { return $("[data-testid='button']") } - get transactionComplete() { return $("[data-testid='transaction-complete']") } - get transactionCompleteRecipient() { return $("[data-testid='to-address']") } - get transactionCompleteAmount() { return $("[data-testid='send-amount']") } - get finishButton() { return $("[data-testid='button']") } - + get fromAddress() { + return $("#from"); + } + get toAddress() { + return $("#to"); + } + get amount() { + return $("#amount"); + } + get nextButton() { + return $("[data-testid='button"); + } + get sendHeader() { + return $("[data-testid='Send PUNK']"); + } + get accountBalance() { + return $("[data-testid='account-balance']"); + } + get amountReviewAndSend() { + return $("[data-testid='Amount']"); + } + get toAddressReviewAndSend() { + return $("[data-testid='To']"); + } + get fromAddressReviewAndSend() { + return $("[data-testid='From']"); + } + get transferFeeAmount() { + return $("[data-testid='Transfer fee']"); + } + get reviewAndSendBackButton() { + return $("[data-testid='back-button']"); + } + get sendButton() { + return $("[data-testid='button']"); + } + get transactionComplete() { + return $("[data-testid='transaction-complete']"); + } + get transactionCompleteRecipient() { + return $("[data-testid='to-address']"); + } + get transactionCompleteAmount() { + return $("[data-testid='send-amount']"); + } + get finishButton() { + return $("[data-testid='button']"); + } } -module.exports = new WalletSend() \ No newline at end of file +module.exports = new WalletSend(); diff --git a/tauri-wallet/webdriver/tests/pages/wallet.undelegate.js b/tauri-wallet/webdriver/tests/pages/wallet.undelegate.js index 9e1c82f99f..664d02ee46 100644 --- a/tauri-wallet/webdriver/tests/pages/wallet.undelegate.js +++ b/tauri-wallet/webdriver/tests/pages/wallet.undelegate.js @@ -1,12 +1,22 @@ class WallentUndelegate { - - get transactionFee() { return $("[data-testid='fee-amount']") } - get mixNodeRadioButton() { return $("[value='mixnode']") } - get gatewayRadionButton() { return $("[value='gateway']") } - get nodeIdentity() { return $("#mui-55011") } - get identityHelper() { return $("#identity-helper-text") } - get delegateButton() { return $("[data-testid='submit-button']") } - + get transactionFee() { + return $("[data-testid='fee-amount']"); + } + get mixNodeRadioButton() { + return $("[value='mixnode']"); + } + get gatewayRadionButton() { + return $("[value='gateway']"); + } + get nodeIdentity() { + return $("#mui-55011"); + } + get identityHelper() { + return $("#identity-helper-text"); + } + get delegateButton() { + return $("[data-testid='submit-button']"); + } } -module.exports = new WallentUndelegate() \ No newline at end of file +module.exports = new WallentUndelegate(); diff --git a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.bond.js b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.bond.js index 76e2d1b64c..18b9cf1112 100644 --- a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.bond.js +++ b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.bond.js @@ -1,55 +1,54 @@ -const userData = require('../../../common/data/user-data.json') -const helper = require('../../../common/helpers/helper') -const walletLogin = require('../../pages/wallet.login') -const textConstants = require('../../../common/constants/text-constants') -const walletHomepage = require('../../pages/wallet.homepage') -const bondPage = require('../../pages/wallet.bond') +const userData = require("../../../common/data/user-data.json"); +const helper = require("../../../common/helpers/helper"); +const walletLogin = require("../../pages/wallet.login"); +const textConstants = require("../../../common/constants/text-constants"); +const walletHomepage = require("../../pages/wallet.homepage"); +const bondPage = require("../../pages/wallet.bond"); describe("bonding and unbonding nodes", () => { - it("should have a node already bonded and validate no input fields are enabled", async () => { + it("should have a node already bonded and validate no input fields are enabled", async () => { + const mnemonic = await helper.decodeBase(userData.mnemonic); - const mnemonic = await helper.decodeBase(userData.mnemonic); + await walletLogin.enterMnemonic(mnemonic); - await walletLogin.enterMnemonic(mnemonic); + await helper.navigateAndClick(walletHomepage.bondButton); - await helper.navigateAndClick(walletHomepage.bondButton); + await helper.scrollIntoView(bondPage.selectAdvancedOptions); - await helper.scrollIntoView(bondPage.selectAdvancedOptions); + await bondPage.selectAdvancedOptions.click(); - await bondPage.selectAdvancedOptions.click(); + //as bond node is mixed expect all the fields to be disabled + const getText = await bondPage.header.getText(); + const getIdentity = await bondPage.identityKey.isEnabled(); + const getSphinxKey = await bondPage.sphinxKey.isEnabled(); + const amountToBond = await bondPage.amountToBond.isEnabled(); + const hostInput = await bondPage.hostInput.isEnabled(); + const verlocPort = await bondPage.verlocPort.isEnabled(); + const httpApiPort = await bondPage.httpApiPort.isEnabled(); + const mixPort = await bondPage.mixPort.isEnabled(); - //as bond node is mixed expect all the fields to be disabled - const getText = await bondPage.header.getText() - const getIdentity = await bondPage.identityKey.isEnabled() - const getSphinxKey = await bondPage.sphinxKey.isEnabled() - const amountToBond = await bondPage.amountToBond.isEnabled() - const hostInput = await bondPage.hostInput.isEnabled() - const verlocPort = await bondPage.verlocPort.isEnabled() - const httpApiPort = await bondPage.httpApiPort.isEnabled() - const mixPort = await bondPage.mixPort.isEnabled() + //assert all field are not functional + expect(getText).toEqual(textConstants.bondNodeHeaderText); + expect(getIdentity).toEqual(false); + expect(getSphinxKey).toEqual(false); + expect(amountToBond).toEqual(false); + expect(hostInput).toEqual(false); + expect(verlocPort).toEqual(false); + expect(httpApiPort).toEqual(false); + expect(mixPort).toEqual(false); + }); - //assert all field are not functional - expect(getText).toEqual(textConstants.bondNodeHeaderText) - expect(getIdentity).toEqual(false) - expect(getSphinxKey).toEqual(false) - expect(amountToBond).toEqual(false) - expect(hostInput).toEqual(false) - expect(verlocPort).toEqual(false) - expect(httpApiPort).toEqual(false) - expect(mixPort).toEqual(false) - }) + it("unbond mix monde screen should be present with the option to unbond", async () => { + //we do not want to unbond our node, check that elements are selectable + await helper.scrollIntoView(walletHomepage.unBondButton); + await helper.navigateAndClick(walletHomepage.unBondButton); - it("unbond mix monde screen should be present with the option to unbond", async () => { - //we do not want to unbond our node, check that elements are selectable - await helper.scrollIntoView(walletHomepage.unBondButton) - await helper.navigateAndClick(walletHomepage.unBondButton) + const getText = await bondPage.header.getText(); + const unbondText = await bondPage.unBondWarning.getText(); - const getText = await bondPage.header.getText() - const unbondText = await bondPage.unBondWarning.getText() - - await bondPage.unBondButton.isClickable() - //assert all field are not functional - expect(getText).toEqual(textConstants.unbondNodeHeaderText) - expect(unbondText).toEqual(textConstants.unbondMixNodeText) - }) -}) + await bondPage.unBondButton.isClickable(); + //assert all field are not functional + expect(getText).toEqual(textConstants.unbondNodeHeaderText); + expect(unbondText).toEqual(textConstants.unbondMixNodeText); + }); +}); diff --git a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.delegate.js b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.delegate.js index d287fe06c4..3143e55685 100644 --- a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.delegate.js +++ b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.delegate.js @@ -1,90 +1,108 @@ -const userData = require('../../../common/data/user-data.json') -const helper = require('../../../common/helpers/helper') -const walletLogin = require('../../pages/wallet.login') -const textConstants = require('../../../common/constants/text-constants') -const walletHomepage = require('../../pages/wallet.homepage') -const delegatePage = require('../../pages/wallet.delegate') +const userData = require("../../../common/data/user-data.json"); +const helper = require("../../../common/helpers/helper"); +const walletLogin = require("../../pages/wallet.login"); +const textConstants = require("../../../common/constants/text-constants"); +const walletHomepage = require("../../pages/wallet.homepage"); +const delegatePage = require("../../pages/wallet.delegate"); describe("delegate to a mix node or gateway", () => { - it("ensure that fields are enabled for existing user", async () => { + it("ensure that fields are enabled for existing user", async () => { + const mnemonic = await helper.decodeBase(userData.mnemonic); - const mnemonic = await helper.decodeBase(userData.mnemonic) + await walletLogin.enterMnemonic(mnemonic); - await walletLogin.enterMnemonic(mnemonic) + await helper.navigateAndClick(walletHomepage.delegateButton); - await helper.navigateAndClick(walletHomepage.delegateButton) + const getText = await delegatePage.header.getText(); - const getText = await delegatePage.header.getText() + expect(getText).toEqual(textConstants.delegateHeaderText); + }); - expect(getText).toEqual(textConstants.delegateHeaderText) - }) + it("submitting the form without input prompts validation errors", async () => { + await delegatePage.delegateStakeButton.click(); - it("submitting the form without input prompts validation errors", async () => { + const getIdentityValidation = + await delegatePage.identityValidation.getText(); + const getAmountValidation = + await delegatePage.amountToDelegateValidation.getText(); - await delegatePage.delegateStakeButton.click() + expect(getIdentityValidation).toEqual( + textConstants.nodeIdentityValidationText + ); + expect(getAmountValidation).toEqual(textConstants.amountValidationText); + }); - const getIdentityValidation = await delegatePage.identityValidation.getText() - const getAmountValidation = await delegatePage.amountToDelegateValidation.getText() + it("input delegate amount to a mix node then broadcast the transaction then check account balances", async () => { + const balanceText = await delegatePage.accountBalance.getText(); - expect(getIdentityValidation).toEqual(textConstants.nodeIdentityValidationText) - expect(getAmountValidation).toEqual(textConstants.amountValidationText) + const getTransfeeAmount = await delegatePage.transactionFeeAmount.getText(); - }) + await delegatePage.nodeIdentity.setValue( + userData.identity_key_to_delegate_mix_node + ); - it("input delegate amount to a mix node then broadcast the transaction then check account balances", async () => { - - const balanceText = await delegatePage.accountBalance.getText() + await delegatePage.amountToDelegate.setValue(userData.delegate_amount); - const getTransfeeAmount = await delegatePage.transactionFeeAmount.getText() + //transfer fee + amount delegation + const sumCost = await helper.calculateFees( + balanceText, + getTransfeeAmount, + userData.delegate_amount, + false + ); - await delegatePage.nodeIdentity.setValue(userData.identity_key_to_delegate_mix_node) + await delegatePage.delegateStakeButton.click(); - await delegatePage.amountToDelegate.setValue(userData.delegate_amount) + await delegatePage.successfullyDelegate.waitForClickable({ + timeout: 10000, + }); - //transfer fee + amount delegation - const sumCost = await helper.calculateFees(balanceText, getTransfeeAmount, userData.delegate_amount, false) + const getConfirmationText = + await delegatePage.successfullyDelegate.getText(); + expect(getConfirmationText).toContain(textConstants.delegationComplete); - await delegatePage.delegateStakeButton.click() + const availablePunk = await delegatePage.accountBalance.getText(); + //expect new account balance - the fee calculation above - await delegatePage.successfullyDelegate.waitForClickable({ timeout: 10000 }) + await delegatePage.finishButton.click(); - const getConfirmationText = await delegatePage.successfullyDelegate.getText() - expect(getConfirmationText).toContain(textConstants.delegationComplete) + expect(await helper.currentBalance(availablePunk)).toEqual(sumCost); + }); - const availablePunk = await delegatePage.accountBalance.getText() - //expect new account balance - the fee calculation above + it("input amount to stake to a gateway then broadcast the transaction then check account balances", async () => { + const balanceText = await delegatePage.accountBalance.getText(); - await delegatePage.finishButton.click() + const getTransfeeAmount = await delegatePage.transactionFeeAmount.getText(); - expect(await helper.currentBalance(availablePunk)).toEqual(sumCost) - - }) + await delegatePage.gateWayRadioButton.click(); - it("input amount to stake to a gateway then broadcast the transaction then check account balances", async () => { - const balanceText = await delegatePage.accountBalance.getText() + await delegatePage.nodeIdentity.setValue( + userData.identity_key_to_delegate_gateway + ); - const getTransfeeAmount = await delegatePage.transactionFeeAmount.getText() + await delegatePage.amountToDelegate.setValue(userData.delegate_amount); - await delegatePage.gateWayRadioButton.click() + //transfer fee + amount delegation - await delegatePage.nodeIdentity.setValue(userData.identity_key_to_delegate_gateway) + const sumCost = await helper.calculateFees( + balanceText, + getTransfeeAmount, + userData.delegate_amount, + false + ); - await delegatePage.amountToDelegate.setValue(userData.delegate_amount) + await delegatePage.delegateStakeButton.click(); - //transfer fee + amount delegation + await delegatePage.successfullyDelegate.waitForClickable({ + timeout: 10000, + }); - const sumCost = await helper.calculateFees(balanceText, getTransfeeAmount, userData.delegate_amount, false) + const getConfirmationText = + await delegatePage.successfullyDelegate.getText(); + expect(getConfirmationText).toContain(textConstants.delegationComplete); - await delegatePage.delegateStakeButton.click() - - await delegatePage.successfullyDelegate.waitForClickable({ timeout: 10000 }) - - const getConfirmationText = await delegatePage.successfullyDelegate.getText() - expect(getConfirmationText).toContain(textConstants.delegationComplete) - - const availablePunk = await delegatePage.accountBalance.getText() - //expect new account balance - the fee calculation above - expect(await helper.currentBalance(availablePunk)).toEqual(sumCost) - - }) -}) + const availablePunk = await delegatePage.accountBalance.getText(); + //expect new account balance - the fee calculation above + expect(await helper.currentBalance(availablePunk)).toEqual(sumCost); + }); +}); diff --git a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.home.js b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.home.js index 43b4cd2da1..0355cdb78b 100644 --- a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.home.js +++ b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.home.js @@ -1,51 +1,45 @@ -const userData = require('../../../common/data/user-data.json') -const helper = require('../../../common/helpers/helper') -const walletLogin = require('../../pages/wallet.login') -const homepPage = require('../../pages/wallet.homepage') -const textConstants = require('../../../common/constants/text-constants') +const userData = require("../../../common/data/user-data.json"); +const helper = require("../../../common/helpers/helper"); +const walletLogin = require("../../pages/wallet.login"); +const homepPage = require("../../pages/wallet.homepage"); +const textConstants = require("../../../common/constants/text-constants"); describe("wallet splash screen", () => { it("should have the sign in header present", async () => { - - const signInText = await walletLogin.signInLabel.getText() - expect(signInText).toEqual(textConstants.homePageSignIn) - - }) + const signInText = await walletLogin.signInLabel.getText(); + expect(signInText).toEqual(textConstants.homePageSignIn); + }); it("submitting the sign in button with no input throws a validation error", async () => { + await walletLogin.signInButton.click(); - await walletLogin.signInButton.click() - - const errorResponseText = await walletLogin.errorValidation.getText() - expect(errorResponseText).toEqual(textConstants.homePageErrorMnemonic) - }) + const errorResponseText = await walletLogin.errorValidation.getText(); + expect(errorResponseText).toEqual(textConstants.homePageErrorMnemonic); + }); //currently the punk_address is not fully displayed on the wallet UI //trim the punk address it("successfully input mnemonic and log in", async () => { - const mnemonic = await helper.decodeBase(userData.mnemonic) + const mnemonic = await helper.decodeBase(userData.mnemonic); - await walletLogin.enterMnemonic(mnemonic) + await walletLogin.enterMnemonic(mnemonic); - await walletLogin.walletAddress.waitForEnabled({ timeout: 5000 }) + await walletLogin.walletAddress.waitForEnabled({ timeout: 5000 }); - const getWalletAddress = await walletLogin.walletAddress.getText() + const getWalletAddress = await walletLogin.walletAddress.getText(); //currently 35 characters are displayed along with three ... //current hack we can assume this is the correct wallet - const walletTruncated = userData.punk_address.substring(0,35) + const walletTruncated = userData.punk_address.substring(0, 35); - expect(walletTruncated + '...').toContain(getWalletAddress) - - }) + expect(walletTruncated + "...").toContain(getWalletAddress); + }); it("successfully log out the application", async () => { + await helper.scrollIntoView(homepPage.logOutButton); - await helper.scrollIntoView(homepPage.logOutButton) + await homepPage.logOutButton.click(); - await homepPage.logOutButton.click() - - await walletLogin.signInLabel.waitForEnabled({ timeout: 1500 }) - expect(await walletLogin.signInLabel.isDisplayed()).toEqual(true) - - }) -}) \ No newline at end of file + await walletLogin.signInLabel.waitForEnabled({ timeout: 1500 }); + expect(await walletLogin.signInLabel.isDisplayed()).toEqual(true); + }); +}); diff --git a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.receive.js b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.receive.js index 791cda2127..1983bbfc11 100644 --- a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.receive.js +++ b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.receive.js @@ -1,29 +1,28 @@ -const userData = require('../../../common/data/user-data.json') -const textConstants = require('../../../common/constants/text-constants') -const helper = require('../../../common/helpers/helper') -const walletLogin = require('../../pages/wallet.login') -const receive = require('../../pages/wallet.receive') -const walletHomepage = require('../../pages/wallet.homepage') +const userData = require("../../../common/data/user-data.json"); +const textConstants = require("../../../common/constants/text-constants"); +const helper = require("../../../common/helpers/helper"); +const walletLogin = require("../../pages/wallet.login"); +const receive = require("../../pages/wallet.receive"); +const walletHomepage = require("../../pages/wallet.homepage"); describe("provide the relevant information about a user nym wallet address", () => { - it("should have the receivers address and a qr code present", async () => { + it("should have the receivers address and a qr code present", async () => { + const mnemonic = await helper.decodeBase(userData.mnemonic); - const mnemonic = await helper.decodeBase(userData.mnemonic) + await walletLogin.enterMnemonic(mnemonic); - await walletLogin.enterMnemonic(mnemonic) + await helper.navigateAndClick(walletHomepage.receiveButton); - await helper.navigateAndClick(walletHomepage.receiveButton) + await receive.receiveNymHeader.waitForDisplayed({ timeout: 1500 }); - await receive.receiveNymHeader.waitForDisplayed({ timeout: 1500 }) + await receive.WaitForButtonChangeOnCopy(); - await receive.WaitForButtonChangeOnCopy() + const textHeader = await receive.receiveNymHeader.getText(); + const getInformationText = await receive.receiveNymText.getText(); + const getPunkAddress = await receive.walletAddress.getText(); - const textHeader = await receive.receiveNymHeader.getText(); - const getInformationText = await receive.receiveNymText.getText() - const getPunkAddress = await receive.walletAddress.getText() - - expect(getPunkAddress).toEqual(userData.punk_address) - expect(getInformationText).toEqual(textConstants.recievePageInformation) - expect(textConstants.receivePageHeaderText).toEqual(textHeader) - }) -}) + expect(getPunkAddress).toEqual(userData.punk_address); + expect(getInformationText).toEqual(textConstants.recievePageInformation); + expect(textConstants.receivePageHeaderText).toEqual(textHeader); + }); +}); diff --git a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.send.js b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.send.js index a230d89421..927ca2a86e 100644 --- a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.send.js +++ b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.send.js @@ -1,55 +1,55 @@ -const userData = require('../../../common/data/user-data.json'); -const helper = require('../../../common/helpers/helper') -const textConstants = require('../../../common/constants/text-constants') -const walletLogin = require('../../pages/wallet.login') -const sendWallet = require('../../pages/wallet.send') -const walletHomepage = require('../../pages/wallet.homepage') +const userData = require("../../../common/data/user-data.json"); +const helper = require("../../../common/helpers/helper"); +const textConstants = require("../../../common/constants/text-constants"); +const walletLogin = require("../../pages/wallet.login"); +const sendWallet = require("../../pages/wallet.send"); +const walletHomepage = require("../../pages/wallet.homepage"); describe("send punk to another a wallet", () => { - it("expect send screen to display the data", async () => { + it("expect send screen to display the data", async () => { + const mnemonic = await helper.decodeBase(userData.mnemonic); - const mnemonic = await helper.decodeBase(userData.mnemonic) + await walletLogin.enterMnemonic(mnemonic); - await walletLogin.enterMnemonic(mnemonic) + await helper.navigateAndClick(walletHomepage.sendButton); - await helper.navigateAndClick(walletHomepage.sendButton) + const textHeader = await sendWallet.sendHeader.getText(); - const textHeader = await sendWallet.sendHeader.getText() + expect(textHeader).toContain(textConstants.sendPunk); + }); - expect(textHeader).toContain(textConstants.sendPunk) + it("send funds correctly to another punk address", async () => { + //already logged in due to the previous test + const getCurrentBalance = await walletHomepage.accountBalance.getText(); - }) + await sendWallet.toAddress.addValue(userData.receiver_address); - it("send funds correctly to another punk address", async () => { + await sendWallet.amount.addValue(userData.amount_to_send); - //already logged in due to the previous test - const getCurrentBalance = await walletHomepage.accountBalance.getText() + await sendWallet.nextButton.waitForEnabled({ timeout: 3000 }); - await sendWallet.toAddress.addValue(userData.receiver_address) + await sendWallet.nextButton.click(); - await sendWallet.amount.addValue(userData.amount_to_send) + const transFee = await sendWallet.transferFeeAmount.getText(); - await sendWallet.nextButton.waitForEnabled({ timeout: 3000 }) + await sendWallet.sendButton.click(); - await sendWallet.nextButton.click() + await sendWallet.finishButton.waitForClickable({ timeout: 10000 }); - const transFee = await sendWallet.transferFeeAmount.getText() + let sumCost = await helper.calculateFees( + getCurrentBalance, + transFee, + userData.amount_to_send, + true + ); - await sendWallet.sendButton.click() + await walletHomepage.accountBalance.isDisplayed(); - await sendWallet.finishButton.waitForClickable({ timeout: 10000 }) + const availablePunk = await walletHomepage.accountBalance.getText(); - let sumCost = await helper.calculateFees(getCurrentBalance, transFee, userData.amount_to_send, true) - - await walletHomepage.accountBalance.isDisplayed() - - const availablePunk = await walletHomepage.accountBalance.getText() - - await sendWallet.finishButton.click() - - //expect new account balance - the fee calculation above - expect(await helper.currentBalance(availablePunk)).toEqual(sumCost) - - }) -}) + await sendWallet.finishButton.click(); + //expect new account balance - the fee calculation above + expect(await helper.currentBalance(availablePunk)).toEqual(sumCost); + }); +}); diff --git a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.undelegate.js b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.undelegate.js index c0beeb40e6..a544825c3b 100644 --- a/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.undelegate.js +++ b/tauri-wallet/webdriver/tests/specs/existinguser/test.wallet.undelegate.js @@ -1,32 +1,32 @@ -const userData = require('../../../common/data/user-data.json') -const helper = require('../../../common/helpers/helper') -const walletLogin = require('../../pages/wallet.login') -const walletHomepage = require('../../pages/wallet.homepage') -const unDelegatePage = require('../../pages/wallet.delegate') +const userData = require("../../../common/data/user-data.json"); +const helper = require("../../../common/helpers/helper"); +const walletLogin = require("../../pages/wallet.login"); +const walletHomepage = require("../../pages/wallet.homepage"); +const unDelegatePage = require("../../pages/wallet.delegate"); describe("un-delegate a mix node or gateway", () => { - it("ensure that fields are enabled for existing user", async () => { - - //we are ensuring that the fields are selectable for undelegation - //not proceeding to undelegate a node or gateway + it("ensure that fields are enabled for existing user", async () => { + //we are ensuring that the fields are selectable for undelegation + //not proceeding to undelegate a node or gateway - const mnemonic = await helper.decodeBase(userData.mnemonic) + const mnemonic = await helper.decodeBase(userData.mnemonic); - await walletLogin.enterMnemonic(mnemonic) + await walletLogin.enterMnemonic(mnemonic); - await helper.scrollIntoView(walletHomepage.unDelegateButton) + await helper.scrollIntoView(walletHomepage.unDelegateButton); - await helper.navigateAndClick(walletHomepage.unDelegateButton) + await helper.navigateAndClick(walletHomepage.unDelegateButton); - await unDelegatePage.unDelegateButton.waitForClickable({ timeout: 1500}) + await unDelegatePage.unDelegateButton.waitForClickable({ timeout: 1500 }); - await unDelegatePage.unDelegateButton.isEnabled() - - await unDelegatePage.unDelegateGatewayRadioButton.click() + await unDelegatePage.unDelegateButton.isEnabled(); - await unDelegatePage.unDelegateGatewayRadioButton.isSelected() - - const mixNodeRadioButton = await unDelegatePage.unMixNodeRadioButton.isSelected() - expect(mixNodeRadioButton).toEqual(false) - }) -}) + await unDelegatePage.unDelegateGatewayRadioButton.click(); + + await unDelegatePage.unDelegateGatewayRadioButton.isSelected(); + + const mixNodeRadioButton = + await unDelegatePage.unMixNodeRadioButton.isSelected(); + expect(mixNodeRadioButton).toEqual(false); + }); +}); diff --git a/tauri-wallet/webdriver/tests/specs/newuser/test.wallet.create.js b/tauri-wallet/webdriver/tests/specs/newuser/test.wallet.create.js index 989edc5a01..e70cd603ed 100644 --- a/tauri-wallet/webdriver/tests/specs/newuser/test.wallet.create.js +++ b/tauri-wallet/webdriver/tests/specs/newuser/test.wallet.create.js @@ -1,38 +1,39 @@ -const walletLogin = require('../../pages/wallet.login') -const walletSignUp = require('../../pages/wallet.create') -const textConstants = require('../../../common/constants/text-constants') +const walletLogin = require("../../pages/wallet.login"); +const walletSignUp = require("../../pages/wallet.create"); +const textConstants = require("../../../common/constants/text-constants"); describe("non existing wallet holder", () => { - //wallet mnemonic gets pushed here - const DATA = [] - it("create a new account and wallet", async () => { + //wallet mnemonic gets pushed here + const DATA = []; + it("create a new account and wallet", async () => { + const signInText = await walletLogin.signInLabel.getText(); + expect(signInText).toEqual(textConstants.homePageSignIn); - const signInText = await walletLogin.signInLabel.getText(); - expect(signInText).toEqual(textConstants.homePageSignIn); + await walletSignUp.createAccount.click(); - await walletSignUp.createAccount.click(); + //wallet generation takes some time - apply wait + await walletSignUp.create.click(); - //wallet generation takes some time - apply wait - await walletSignUp.create.click() + await walletSignUp.accountCreatedSuccessfully.waitForEnabled({ + timeout: 10000, + }); - await walletSignUp.accountCreatedSuccessfully.waitForEnabled({ timeout: 10000 }) + const getWalletText = await walletSignUp.punkAddress.getText(); + expect(getWalletText.length).toEqual(43); - const getWalletText = await walletSignUp.punkAddress.getText() - expect(getWalletText.length).toEqual(43) + const accountCreated = + await walletSignUp.accountCreatedSuccessfully.getText(); + expect(accountCreated).toEqual(textConstants.walletSuccess); - const accountCreated = await walletSignUp.accountCreatedSuccessfully.getText() - expect(accountCreated).toEqual(textConstants.walletSuccess) + const getMnemonic = await walletSignUp.walletMnemonicValue.getText(); + DATA.push(getMnemonic); + }); - const getMnemonic = await walletSignUp.walletMnemonicValue.getText() - DATA.push(getMnemonic) - }) + it("navigate back to sign in screen and validate mnemonic works", async () => { + await walletSignUp.backToSignIn.click(); - it("navigate back to sign in screen and validate mnemonic works", async () => { + await walletLogin.enterMnemonic(DATA[0]); - await walletSignUp.backToSignIn.click() - - await walletLogin.enterMnemonic(DATA[0]) - - await walletLogin.walletAddress.isDisplayed() - }) -}) \ No newline at end of file + await walletLogin.walletAddress.isDisplayed(); + }); +}); diff --git a/tauri-wallet/webdriver/wdio.conf.cjs b/tauri-wallet/webdriver/wdio.conf.cjs index f517547365..c91d7370fc 100644 --- a/tauri-wallet/webdriver/wdio.conf.cjs +++ b/tauri-wallet/webdriver/wdio.conf.cjs @@ -2,7 +2,7 @@ const os = require("os"); const path = require("path"); const { spawn, spawnSync } = require("child_process"); //insert path to binary -const nym_path = "../target/release/nym_wallet"; +const nym_path = "../target/release/nym-wallet"; exports.config = { //run sequentially, as using one default user may cause issues for parallel test runs for now @@ -12,18 +12,22 @@ exports.config = { "./tests/specs/existinguser/test.wallet.receive.js", "./tests/specs/existinguser/test.wallet.bond.js", "./tests/specs/existinguser/test.wallet.delegate.js", - "./tests/specs/newuser/test.wallet.create.js" + "./tests/specs/newuser/test.wallet.create.js", ], - //run tests by providing --suite {{login}} + //run tests by providing --suite {{login}} suites: { home: ["./tests/specs/existinguser/test.wallet.home.js"], - sendreceive: ["./tests/specs/existinguser/test.wallet.send.js", - "./tests/specs/existinguser/test.wallet.receive.js"], + sendreceive: [ + "./tests/specs/existinguser/test.wallet.send.js", + "./tests/specs/existinguser/test.wallet.receive.js", + ], bond: ["./tests/specs/existinguser/test.wallet.bond.js"], - delegate: ["./tests/specs/existinguser/test.wallet.delegate.js", - "./tests/specs/existinguser/test.wallet.undelegate.js"], - newuser: ["./tests/specs/newuser/test.wallet.create.js"] + delegate: [ + "./tests/specs/existinguser/test.wallet.delegate.js", + "./tests/specs/existinguser/test.wallet.undelegate.js", + ], + newuser: ["./tests/specs/newuser/test.wallet.create.js"], }, maxInstances: 1, capabilities: [ @@ -40,22 +44,27 @@ exports.config = { // Define all options that are relevant for the WebdriverIO instance here // Level of logging verbosity: trace | debug | info | warn | error | silent bail: 0, - framework: 'mocha', - reporters: ['spec'], + framework: "mocha", + reporters: ["spec"], mochaOpts: { - ui: 'bdd', - timeout: 60000 + ui: "bdd", + timeout: 60000, }, - logLevel: 'silent', + logLevel: "silent", // =================== // Test Reporters // =================== - reporters: [['allure', { - outputDir: 'allure-results', - disableWebdriverStepsReporting: true, - disableWebdriverScreenshotsReporting: true, - }]], + reporters: [ + [ + "allure", + { + outputDir: "allure-results", + disableWebdriverStepsReporting: true, + disableWebdriverScreenshotsReporting: true, + }, + ], + ], // this is documentented in the readme - you will need to build the project first // ensure the rust project is built since we expect this binary to exist for the webdriver sessions @@ -63,18 +72,22 @@ exports.config = { // ensure we are running `tauri-driver` before the session starts so that we can proxy the webdriver requests beforeSession: () => - (tauriDriver = spawn( - path.resolve(os.homedir(), ".cargo", "bin", "tauri-driver"), - [], - { stdio: [null, process.stdout, process.stderr] } - )), + (tauriDriver = spawn( + path.resolve(os.homedir(), ".cargo", "bin", "tauri-driver"), + [], + { stdio: [null, process.stdout, process.stderr] } + )), - afterTest: function (test, context, { error, result, duration, passed, retries }) { + afterTest: function ( + test, + context, + { error, result, duration, passed, retries } + ) { if (error) { - browser.takeScreenshot() + browser.takeScreenshot(); } }, // clean up the `tauri-driver` process we spawned at the start of the session - afterSession: () => tauriDriver.kill() -} + afterSession: () => tauriDriver.kill(), +}; From 4ed9d3a29761ba1afc16feae59a5cb614886c2a7 Mon Sep 17 00:00:00 2001 From: Tommy Date: Mon, 8 Nov 2021 14:55:49 +0000 Subject: [PATCH 2/4] Updated rust version for installation --- tauri-wallet/webdriver/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tauri-wallet/webdriver/README.md b/tauri-wallet/webdriver/README.md index 9fda6fc032..acd346ec57 100644 --- a/tauri-wallet/webdriver/README.md +++ b/tauri-wallet/webdriver/README.md @@ -13,7 +13,7 @@ on the UI of the nym wallet. Currently, tauri-driver is available to run on Wind - `Yarn` - `NodeJS >= v16.8.0` -- `Rust & cargo >= v1.51` +- `Rust & cargo >= v1.56.1` - `tauri-driver` - `That you have an existing mnemonic and you can login to the app` - `Have the details listed below to provide the user-data.json file` From c7007de1ea3ae92b44ef5d60f589eeb2f6b17f27 Mon Sep 17 00:00:00 2001 From: Drazen Urch Date: Wed, 10 Nov 2021 15:02:59 +0100 Subject: [PATCH 3/4] Only use ts-rs in tests --- Cargo.lock | 8 +- .../client-libs/validator-client/Cargo.toml | 2 +- .../validator-client/src/nymd/fee_helpers.rs | 4 +- common/mixnet-contract/Cargo.toml | 4 +- tauri-wallet/Cargo.lock | 449 +++++++++++------- tauri-wallet/src-tauri/Cargo.toml | 16 +- tauri-wallet/src-tauri/src/coin.rs | 7 +- tauri-wallet/src-tauri/src/main.rs | 28 +- .../src-tauri/src/operations/account.rs | 7 +- .../src-tauri/src/operations/admin.rs | 4 +- .../src-tauri/src/operations/delegate.rs | 4 +- tauri-wallet/src-tauri/src/operations/send.rs | 7 +- tauri-wallet/src/types/rust/tauritxresult.ts | 6 +- 13 files changed, 322 insertions(+), 224 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c27860c548..d1fe5c2df0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6770,9 +6770,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "ts-rs" -version = "3.1.0" +version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "369e48de67506679b3a576b0faf666fa9f9acf2fd00b4c61e28bdb6c8e08ec06" +checksum = "f34750e8cbb4d87d09f6d7441921cc6d9435dcc58df53bbaec01f5f9945d4801" dependencies = [ "dprint-plugin-typescript", "ts-rs-macros", @@ -6780,9 +6780,9 @@ dependencies = [ [[package]] name = "ts-rs-macros" -version = "3.1.0" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f269e8fd28e26b4cdbd01f81f345aaf666131511e54a735a76a614b5062d0a5a" +checksum = "4c78e4905e64bb23c814098885e08778dfed7fd796ea503df29aa3ba5fead009" dependencies = [ "Inflector", "proc-macro2", diff --git a/common/client-libs/validator-client/Cargo.toml b/common/client-libs/validator-client/Cargo.toml index 11f4c14119..e2f7add411 100644 --- a/common/client-libs/validator-client/Cargo.toml +++ b/common/client-libs/validator-client/Cargo.toml @@ -32,7 +32,7 @@ flate2 = { version = "1.0.20", optional = true } sha2 = { version = "0.9.5", optional = true } itertools = { version = "0.10", optional = true } cosmwasm-std = { git = "https://github.com/jstuczyn/cosmwasm", branch="0.14.1-updatedk256", optional = true } -ts-rs = "3.0" +ts-rs = {version = "5.1", optional = true} [features] nymd-client = ["async-trait", "bip39", "config", "cosmrs", "prost", "flate2", "sha2", "itertools", "cosmwasm-std"] diff --git a/common/client-libs/validator-client/src/nymd/fee_helpers.rs b/common/client-libs/validator-client/src/nymd/fee_helpers.rs index f63daf83b4..b340f18115 100644 --- a/common/client-libs/validator-client/src/nymd/fee_helpers.rs +++ b/common/client-libs/validator-client/src/nymd/fee_helpers.rs @@ -6,9 +6,9 @@ use cosmrs::tx::{Fee, Gas}; use cosmrs::Coin; use serde::{Deserialize, Serialize}; use std::fmt; -use ts_rs::TS; -#[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Serialize, Deserialize, TS)] +#[cfg_attr(feature = "ts-rs", derive(ts_rs::TS))] +#[derive(Debug, Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Serialize, Deserialize)] pub enum Operation { Upload, Init, diff --git a/common/mixnet-contract/Cargo.toml b/common/mixnet-contract/Cargo.toml index fba7fecfd1..4267e290d4 100644 --- a/common/mixnet-contract/Cargo.toml +++ b/common/mixnet-contract/Cargo.toml @@ -14,7 +14,7 @@ cosmwasm-std = { git = "https://github.com/jstuczyn/cosmwasm", branch = "0.14.1- serde = { version = "1.0", features = ["derive"] } serde_repr = "0.1" schemars = "0.8" -ts-rs = { version = "3.0", optional = true } +ts-rs = { version = "5.1", optional = true } thiserror = "1.0" network-defaults = { path = "../network-defaults" } fixed = "1.1" @@ -22,4 +22,4 @@ az = "1.1" log = "0.4.14" [features] -default = ["ts-rs"] +default = [] diff --git a/tauri-wallet/Cargo.lock b/tauri-wallet/Cargo.lock index 0360d27c08..615edc8be6 100644 --- a/tauri-wallet/Cargo.lock +++ b/tauri-wallet/Cargo.lock @@ -47,10 +47,19 @@ dependencies = [ ] [[package]] -name = "anyhow" -version = "1.0.43" +name = "ansi_term" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28ae2b3dec75a406790005a200b1bd89785afc02517a00ca99ecfe093ee9e6cf" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee10e43ae4a853c0a3591d4e2ada1719e553be18199d9da9d4a83f5927c2f5c7" [[package]] name = "arrayref" @@ -60,15 +69,15 @@ checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4dc07131ffa69b8072d35f5007352af944213cde02545e2103680baed38fcd" +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "ast_node" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93f52ce8fac3d0e6720a92b0576d737c01b1b5db4dd786e962e5925f00bf755" +checksum = "e96d5444b02f3080edac8a144f6baf29b2fb6ff589ad4311559731a7c7529381" dependencies = [ "darling", "pmutil", @@ -219,9 +228,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcd555c66291d5f836dbb6883b48660ece810fe25a31f3bdfb911945dff2691f" +checksum = "526c210b4520e416420759af363083471656e819a75e831b8d2c9d5a584f2413" dependencies = [ "arrayref", "arrayvec", @@ -301,18 +310,18 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "memchr", ] [[package]] name = "bumpalo" -version = "3.7.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c59e7af012c713f529e7a3ee57ce9b31ddd858d4b512923602f74608b009631" +checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" [[package]] name = "byte-tools" @@ -361,9 +370,9 @@ dependencies = [ [[package]] name = "cairo-rs" -version = "0.14.3" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f859ade407c19810ae920b4fafab92189ed312adad490d08fb16b5f49f1e2207" +checksum = "33b5725979db0c586d98abad2193cdb612dd40ef95cd26bd99851bf93b3cb482" dependencies = [ "bitflags", "cairo-sys-rs", @@ -374,9 +383,9 @@ dependencies = [ [[package]] name = "cairo-sys-rs" -version = "0.14.0" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c9c3928781e8a017ece15eace05230f04b647457d170d2d9641c94a444ff80" +checksum = "b448b876970834fda82ba3aeaccadbd760206b75388fc5c1b02f1e343b697570" dependencies = [ "glib-sys 0.14.0", "libc", @@ -385,9 +394,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.70" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" +checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" dependencies = [ "jobserver", ] @@ -408,7 +417,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b412e83326147c2bb881f8b40edfbf9905b9b8abaebd0e47ca190ba62fda8f0e" dependencies = [ - "smallvec 1.6.1", + "smallvec 1.7.0", ] [[package]] @@ -445,9 +454,11 @@ version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ + "libc", "num-integer", "num-traits", "serde", + "winapi", ] [[package]] @@ -477,8 +488,8 @@ dependencies = [ "bitflags", "block", "cocoa-foundation", - "core-foundation 0.9.1", - "core-graphics 0.22.2", + "core-foundation 0.9.2", + "core-graphics 0.22.3", "foreign-types", "libc", "objc", @@ -492,7 +503,7 @@ checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" dependencies = [ "bitflags", "block", - "core-foundation 0.9.1", + "core-foundation 0.9.2", "core-graphics-types", "foreign-types", "libc", @@ -572,9 +583,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c32f031ea41b4291d695026c023b95d59db2d8a2c7640800ed56bc8f510f22" +checksum = "9d6f2aa4d0537bcc1c74df8755072bd31c1ef1a3a1b85a68e8404a8c353b7b8b" [[package]] name = "constant_time_eq" @@ -600,11 +611,11 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" dependencies = [ - "core-foundation-sys 0.8.2", + "core-foundation-sys 0.8.3", "libc", ] @@ -616,9 +627,9 @@ checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" [[package]] name = "core-foundation-sys" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "core-graphics" @@ -634,12 +645,12 @@ dependencies = [ [[package]] name = "core-graphics" -version = "0.22.2" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269f35f69b542b80e736a20a89a05215c0ce80c2c03c514abb2e318b78379d86" +checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" dependencies = [ "bitflags", - "core-foundation 0.9.1", + "core-foundation 0.9.2", "core-graphics-types", "foreign-types", "libc", @@ -652,7 +663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" dependencies = [ "bitflags", - "core-foundation 0.9.1", + "core-foundation 0.9.2", "foreign-types", "libc", ] @@ -841,9 +852,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.2.6" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e49339137316df1914fdb54a5eae75a73f45068fd0d2178fe235b11d93238a6e" +checksum = "f83bd3bb4314701c568e340cd8cf78c975aa0ca79e03d3f6d1677d5b0c9c0c03" dependencies = [ "generic-array 0.14.4", "rand_core 0.6.3", @@ -884,7 +895,7 @@ dependencies = [ "phf 0.8.0", "proc-macro2", "quote", - "smallvec 1.6.1", + "smallvec 1.7.0", "syn", ] @@ -986,9 +997,9 @@ dependencies = [ [[package]] name = "der" -version = "0.4.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e21d2d0f22cde6e88694108429775c0219760a07779bf96503b434a03d7412" +checksum = "28e98c534e9c8a0483aa01d6f6913bc063de254311bd267c9cf535e9b70e15b2" dependencies = [ "const-oid", ] @@ -1037,9 +1048,9 @@ dependencies = [ [[package]] name = "dirs" -version = "3.0.2" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" dependencies = [ "dirs-sys", ] @@ -1221,9 +1232,9 @@ checksum = "53dd2e43a7d32952a6054141ee0d75183958620e84e5eab045de362dff13dc99" [[package]] name = "encoding_rs" -version = "0.8.28" +version = "0.8.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" +checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" dependencies = [ "cfg-if 1.0.0", ] @@ -1311,9 +1322,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ "cfg-if 1.0.0", "crc32fast", @@ -1510,9 +1521,9 @@ dependencies = [ [[package]] name = "gdk" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a453eae5ec10345b3a96ca1b547328bfc94edd40aa95b08f14bb4c35863db140" +checksum = "b9d749dcfc00d8de0d7c3a289e04a04293eb5ba3d8a4e64d64911d481fa9933b" dependencies = [ "bitflags", "cairo-rs", @@ -1638,9 +1649,9 @@ dependencies = [ [[package]] name = "gio" -version = "0.14.5" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a4c12fcba7a6402ae843a0085ec16d3658a87901763b6a7f0a7c5d60e555a5" +checksum = "711c3632b3ebd095578a9c091418d10fed492da9443f58ebc8f45efbeb215cb0" dependencies = [ "bitflags", "futures-channel", @@ -1681,9 +1692,9 @@ dependencies = [ [[package]] name = "glib" -version = "0.14.5" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a930b7208e6e0ab839eea5f65ac2b82109f729621430d47fe905e2e09d33f4" +checksum = "7c515f1e62bf151ef6635f528d05b02c11506de986e43b34a5c920ef0b3796a4" dependencies = [ "bitflags", "futures-channel", @@ -1695,7 +1706,7 @@ dependencies = [ "gobject-sys 0.14.0", "libc", "once_cell", - "smallvec 1.6.1", + "smallvec 1.7.0", ] [[package]] @@ -1706,7 +1717,7 @@ checksum = "2aad66361f66796bfc73f530c51ef123970eb895ffba991a234fcf7bea89e518" dependencies = [ "anyhow", "heck", - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro-error", "proc-macro2", "quote", @@ -1782,9 +1793,9 @@ dependencies = [ [[package]] name = "gtk" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6603bb79ded6ac6f3bac203794383afa8b1d6a8656d34a93a88f0b22826cd46c" +checksum = "2eb51122dd3317e9327ec1e4faa151d1fa0d95664cd8fb8dcfacf4d4d29ac70c" dependencies = [ "atk", "bitflags", @@ -1829,7 +1840,7 @@ checksum = "21de1da96dc117443fb03c2e270b2d34b7de98d0a79a19bbb689476173745b79" dependencies = [ "anyhow", "heck", - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro-error", "proc-macro2", "quote", @@ -1838,9 +1849,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.4" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f3675cfef6a30c8031cf9e6493ebdc3bb3272a3fea3923c4210d1830e6a472" +checksum = "7fd819562fcebdac5afc5c113c3ec36f902840b70fd4fc458799c8ce4607ae55" dependencies = [ "bytes", "fnv", @@ -1883,18 +1894,18 @@ checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" [[package]] name = "headers" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0b7591fb62902706ae8e7aaff416b1b0fa2c0fd0878b46dc13baa3712d8a855" +checksum = "a4c4eb0471fcb85846d8b0690695ef354f9afb11cb03cac2e1d7c9253351afb0" dependencies = [ "base64", "bitflags", "bytes", "headers-core", "http", + "httpdate", "mime", "sha-1 0.9.8", - "time 0.1.43", ] [[package]] @@ -1986,9 +1997,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" +checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" dependencies = [ "bytes", "fnv", @@ -1997,9 +2008,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c583b2979440c60be0821a6199eca73bc3c8dcd9d070d75ac726e2c6186e5" +checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ "bytes", "http", @@ -2042,9 +2053,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.12" +version = "0.14.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f67199e765030fa08fe0bd581af683f0d5bc04ea09c2b1102012c5fb90e7fd" +checksum = "2b91bb1f221b6ea1f1e4371216b70f40748774c2fb5971b450c07773fb92d26b" dependencies = [ "bytes", "futures-channel", @@ -2194,9 +2205,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", ] @@ -2323,9 +2334,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.101" +version = "0.2.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +checksum = "fbe5e23404da5b4f555ef85ebed98fb4083e55a00c317800bc2a50ede9f3d219" [[package]] name = "libm" @@ -2365,15 +2376,17 @@ dependencies = [ [[package]] name = "loom" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2111607c723d7857e0d8299d5ce7a0bf4b844d3e44f8de136b13da513eaf8fc4" +checksum = "b2b9df80a3804094bf49bb29881d18f6f05048db72127e84e09c26fc7c2324f5" dependencies = [ "cfg-if 1.0.0", "generator", "scoped-tls", "serde", "serde_json", + "tracing", + "tracing-subscriber", ] [[package]] @@ -2411,6 +2424,15 @@ dependencies = [ "tendril", ] +[[package]] +name = "matchers" +version = "0.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1" +dependencies = [ + "regex-automata", +] + [[package]] name = "matches" version = "0.1.9" @@ -2465,9 +2487,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" dependencies = [ "libc", "log", @@ -2571,7 +2593,7 @@ version = "0.1.0" dependencies = [ "hex-literal", "serde", - "time 0.3.3", + "time 0.3.4", "url", ] @@ -2676,7 +2698,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "486ea01961c4a818096de679a8b740b26d9033146ac5291b1c98557658f8cdd9" dependencies = [ - "proc-macro-crate 1.0.0", + "proc-macro-crate 1.1.0", "proc-macro2", "quote", "syn", @@ -2763,9 +2785,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.36" +version = "0.10.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a" +checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -2783,9 +2805,9 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "openssl-sys" -version = "0.9.66" +version = "0.9.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82" +checksum = "c6517987b3f8226b5da3661dad65ff7f300cc59fb5ea8333ca191fc65fde3edf" dependencies = [ "autocfg 1.0.1", "cc", @@ -2814,9 +2836,9 @@ dependencies = [ [[package]] name = "pango" -version = "0.14.3" +version = "0.14.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc88307d9797976ea62722ff2ec5de3fae279c6e20100ed3f49ca1a4bf3f96" +checksum = "546fd59801e5ca735af82839007edd226fe7d3bb06433ec48072be4439c28581" dependencies = [ "bitflags", "glib", @@ -2864,15 +2886,15 @@ dependencies = [ "instant", "libc", "redox_syscall", - "smallvec 1.6.1", + "smallvec 1.7.0", "winapi", ] [[package]] name = "paste" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" +checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" [[package]] name = "pbkdf2" @@ -3109,9 +3131,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkcs8" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbee84ed13e44dd82689fa18348a49934fa79cc774a344c42fc9b301c71b140a" +checksum = "ee3ef9b64d26bad0536099c816c6734379e45bbd5f14798def6809e5cc350447" dependencies = [ "der", "spki", @@ -3119,9 +3141,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" [[package]] name = "pmutil" @@ -3160,9 +3182,9 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "precomputed-hash" @@ -3181,9 +3203,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" dependencies = [ "thiserror", "toml", @@ -3227,9 +3249,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.29" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" dependencies = [ "unicode-xid", ] @@ -3275,9 +3297,9 @@ checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" [[package]] name = "quote" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ "proc-macro2", ] @@ -3562,6 +3584,15 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax", +] + [[package]] name = "regex-syntax" version = "0.6.25" @@ -3579,9 +3610,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.4" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246e9f61b9bb77df069a947682be06e31ac43ea37862e244a69f177694ea6d22" +checksum = "66d2927ca2f685faf0fc620ac4834690d29e7abb153add10f5812eef20b5e280" dependencies = [ "base64", "bytes", @@ -3728,9 +3759,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6ab463ae35acccb5cba66c0084c985257b797d288b6050cc2f6ac1b266cb78" +checksum = "d7a48d098c2a7fdf5740b19deb1181b4fb8a9e68e03ae517c14cde04b5725409" dependencies = [ "dyn-clone", "schemars_derive", @@ -3740,9 +3771,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.3" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "902fdfbcf871ae8f653bddf4b2c05905ddaabc08f69d32a915787e3be0d31356" +checksum = "4a9ea2a613fe4cd7118b2bb101a25d8ae6192e1975179b67b2f17afd11e70ac8" dependencies = [ "proc-macro2", "quote", @@ -3779,8 +3810,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" dependencies = [ "bitflags", - "core-foundation 0.9.1", - "core-foundation-sys 0.8.2", + "core-foundation 0.9.2", + "core-foundation-sys 0.8.3", "libc", "security-framework-sys", ] @@ -3791,7 +3822,7 @@ version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" dependencies = [ - "core-foundation-sys 0.8.2", + "core-foundation-sys 0.8.3", "libc", ] @@ -3811,7 +3842,7 @@ dependencies = [ "phf_codegen", "precomputed-hash", "servo_arc", - "smallvec 1.6.1", + "smallvec 1.7.0", "thin-slice", ] @@ -3890,9 +3921,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950" +checksum = "e466864e431129c7e0d3476b92f20458e5879919a0596c6472738d9fa2d342f8" dependencies = [ "itoa", "ryu", @@ -3995,10 +4026,19 @@ dependencies = [ ] [[package]] -name = "signature" -version = "1.3.1" +name = "sharded-slab" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19772be3c4dd2ceaacf03cb41d5885f2a02c4d8804884918e3a258480803335" +checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signature" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2807892cfa58e081aa1f1111391c7a0649d4fa127a4ffbe34bcbfb35a1171a4" dependencies = [ "digest 0.9.0", "rand_core 0.6.3", @@ -4012,9 +4052,9 @@ checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b" [[package]] name = "slab" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" +checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "smallvec" @@ -4027,15 +4067,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] name = "socket2" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" +checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" dependencies = [ "libc", "winapi", @@ -4087,9 +4127,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spki" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "987637c5ae6b3121aba9d513f869bd2bff11c4cc086c22473befd6649c0bd521" +checksum = "5c01a0c15da1b0b0e1494112e7af814a678fec9bd157881b49beac661e9b6f32" dependencies = [ "der", ] @@ -4117,12 +4157,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_cache" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb1139b5353f96e429e1a5e19fbaf663bddedaa06d1dbd49f82e352601209a" +checksum = "923f0f39b6267d37d23ce71ae7235602134b250ace715dd2c90421998ddac0c6" dependencies = [ "lazy_static", "new_debug_unreachable", + "parking_lot", "phf_shared 0.8.0", "precomputed-hash", "serde", @@ -4218,9 +4259,9 @@ dependencies = [ [[package]] name = "swc_atoms" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "837a3ef86c2817228e733b6f173c821fd76f9eb21a0bc9001a826be48b00b4e7" +checksum = "9f5229fe227ff0060e13baa386d6e368797700eab909523f730008d191ee53ae" dependencies = [ "string_cache", "string_cache_codegen", @@ -4275,7 +4316,7 @@ dependencies = [ "log", "num-bigint", "serde", - "smallvec 1.6.1", + "smallvec 1.7.0", "swc_atoms", "swc_common", "swc_ecma_ast", @@ -4332,9 +4373,9 @@ dependencies = [ [[package]] name = "swc_visit" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a423caa0b4585118164dbad8f1ad52b592a9a9370b25decc4d84c6b4309132c0" +checksum = "f8511a4788ab29daf00bee23e425aac92c9be4eec74c98fec4a45d0e710be695" dependencies = [ "either", "swc_visit_macros", @@ -4367,9 +4408,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", @@ -4420,8 +4461,8 @@ dependencies = [ "cairo-rs", "cc", "cocoa", - "core-foundation 0.9.1", - "core-graphics 0.22.2", + "core-foundation 0.9.2", + "core-graphics 0.22.3", "core-video-sys", "crossbeam-channel", "dispatch", @@ -4721,15 +4762,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "termcolor" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -dependencies = [ - "winapi-util", -] - [[package]] name = "thin-slice" version = "0.1.1" @@ -4738,18 +4770,18 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2", "quote", @@ -4777,9 +4809,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde1cf55178e0293453ba2cca0d5f8392a922e52aa958aee9c28ed02becc6d03" +checksum = "99beeb0daeac2bd1e86ac2c21caddecb244b39a093594da1a661ec2060c7aedd" dependencies = [ "libc", "time-macros", @@ -4793,9 +4825,9 @@ checksum = "25eb0ca3468fc0acc11828786797f6ef9aa1555e4a211a60d64cc8e4d1be47d6" [[package]] name = "tokio" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" +checksum = "588b2d10a336da58d877567cd8fb8a14b463e2104910f8132cd054b4b96e29ee" dependencies = [ "autocfg 1.0.1", "bytes", @@ -4810,9 +4842,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.3.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" +checksum = "114383b041aa6212c579467afa0075fbbdd0718de036100bc0ba7961d8cb9095" dependencies = [ "proc-macro2", "quote", @@ -4842,9 +4874,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d3725d3efa29485e87311c5b699de63cde14b00ed4d256b8318aa30ca452cd" +checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" dependencies = [ "bytes", "futures-core", @@ -4871,24 +4903,79 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.26" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" +checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" dependencies = [ "cfg-if 1.0.0", "pin-project-lite", + "tracing-attributes", "tracing-core", ] [[package]] -name = "tracing-core" -version = "0.1.19" +name = "tracing-attributes" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ca517f43f0fb96e0c3072ed5c275fe5eece87e8cb52f4a77b69226d3b1c9df8" +checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" dependencies = [ "lazy_static", ] +[[package]] +name = "tracing-log" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6923477a48e41c1951f1999ef8bb5a3023eb723ceadafe78ffb65dc366761e3" +dependencies = [ + "lazy_static", + "log", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb65ea441fbb84f9f6748fd496cf7f63ec9af5bca94dd86456978d055e8eb28b" +dependencies = [ + "serde", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71" +dependencies = [ + "ansi_term", + "chrono", + "lazy_static", + "matchers", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec 1.7.0", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", +] + [[package]] name = "try-lock" version = "0.2.3" @@ -4897,9 +4984,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "ts-rs" -version = "3.0.0" +version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89634b937615f3e50462b9529a36aa309d557c893eb79ce8a93d7e1915820859" +checksum = "f34750e8cbb4d87d09f6d7441921cc6d9435dcc58df53bbaec01f5f9945d4801" dependencies = [ "dprint-plugin-typescript", "ts-rs-macros", @@ -4907,15 +4994,14 @@ dependencies = [ [[package]] name = "ts-rs-macros" -version = "3.0.0" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "117c837b4f78dbaa8e7d06aefae35267f49cb0a47f5df4ed75b777acb83ba14d" +checksum = "4c78e4905e64bb23c814098885e08778dfed7fd796ea503df29aa3ba5fead009" dependencies = [ "Inflector", "proc-macro2", "quote", "syn", - "termcolor", ] [[package]] @@ -4944,9 +5030,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" [[package]] name = "unicode-normalization" @@ -4965,9 +5051,9 @@ checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" @@ -5105,8 +5191,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fe8f61dba8e5d645a4d8132dc7a0a66861ed5e1045d2c0ed940fab33bac0fbe" dependencies = [ "cfg-if 1.0.0", - "serde", - "serde_json", "wasm-bindgen-macro", ] @@ -5243,9 +5327,9 @@ dependencies = [ [[package]] name = "webview2" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fab1ccfdabb098b047293c8d496c1914d1c654b68fdaa3bb77cfa47c4bca2c7" +checksum = "283bf6b0ed9c83faea8c7bfe40bb261592147a109effaa4077eed294863d5031" dependencies = [ "com", "once_cell", @@ -5256,9 +5340,9 @@ dependencies = [ [[package]] name = "webview2-sys" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5288cef1e0cbcf7a0b961e6271e33589b8989c80b2e11078504e989b5346ff" +checksum = "24b7889e893ac4c50d7346356be3ce13a85e56512c38b8fde0526559b8012a4c" dependencies = [ "com", "winapi", @@ -5266,9 +5350,9 @@ dependencies = [ [[package]] name = "widestring" -version = "0.4.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" +checksum = "17882f045410753661207383517a6f62ec3dbeb6a4ed2acce01f0728238d1983" [[package]] name = "wildmatch" @@ -5318,9 +5402,9 @@ dependencies = [ [[package]] name = "winres" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4fb510bbfe5b8992ff15f77a2e6fe6cf062878f0eda00c0f44963a807ca5dc" +checksum = "b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c" dependencies = [ "toml", ] @@ -5332,7 +5416,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f9549393a3917b5303277abb0267f8eecf9fd629b25f1c04e5284aa58b61915" dependencies = [ "cocoa", - "core-graphics 0.22.2", + "core-graphics 0.22.3", "gdk", "gio", "glib", @@ -5357,13 +5441,12 @@ dependencies = [ [[package]] name = "x11-dl" -version = "2.18.5" +version = "2.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf981e3a5b3301209754218f962052d4d9ee97e478f4d26d4a6eced34c1fef8" +checksum = "ea26926b4ce81a6f5d9d0f3a0bc401e5a37c6ae14a1bfaa8ff6099ca80038c59" dependencies = [ "lazy_static", "libc", - "maybe-uninit", "pkg-config", ] @@ -5398,9 +5481,9 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.1.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" +checksum = "65f1a51723ec88c66d5d1fe80c841f17f63587d6691901d66be9bec6c3b51f73" dependencies = [ "proc-macro2", "quote", diff --git a/tauri-wallet/src-tauri/Cargo.toml b/tauri-wallet/src-tauri/Cargo.toml index 5689dec128..3bf8367f52 100644 --- a/tauri-wallet/src-tauri/Cargo.toml +++ b/tauri-wallet/src-tauri/Cargo.toml @@ -20,15 +20,14 @@ serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } tauri = { version = "1.0.0-beta.8", features = [] } tokio = { version = "1.10", features = ["sync"] } -dirs = "3.0" -# url = "2.2" +dirs = "4.0" bip39 = "1.0" thiserror = "1.0" tendermint-rpc = "0.23.0" -ts-rs = "3.0" url = "2.0" rand = "0.6.5" + cosmrs = { version = "0.3", features = ["rpc", "bip32", "cosmwasm"] } cosmwasm-std = { git = "https://github.com/jstuczyn/cosmwasm", branch = "0.14.1-updatedk256" } @@ -40,6 +39,17 @@ config = { path = "../../common/config" } coconut-interface = { path = "../../common/coconut-interface" } credentials = { path = "../../common/credentials" } +[dev-dependencies] +ts-rs = "5.1" + +[dev-dependencies.mixnet-contract] +path = "../../common/mixnet-contract" +features = ["ts-rs"] + +[dev-dependencies.validator-client] +path = "../../common/client-libs/validator-client" +features = ["ts-rs"] + [features] default = ["custom-protocol"] custom-protocol = ["tauri/custom-protocol"] diff --git a/tauri-wallet/src-tauri/src/coin.rs b/tauri-wallet/src-tauri/src/coin.rs index 8a7862b80f..3b2bf5931f 100644 --- a/tauri-wallet/src-tauri/src/coin.rs +++ b/tauri-wallet/src-tauri/src/coin.rs @@ -10,12 +10,12 @@ use std::convert::TryFrom; use std::fmt; use std::ops::{Add, Sub}; use std::str::FromStr; -use ts_rs::TS; use validator_client::nymd::{CosmosCoin, GasPrice}; use crate::format_err; -#[derive(TS, Serialize, Deserialize, Clone, PartialEq, Debug)] +#[cfg_attr(test, derive(ts_rs::TS))] +#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub enum Denom { Major, Minor, @@ -50,7 +50,8 @@ impl FromStr for Denom { } } -#[derive(TS, Serialize, Deserialize, Clone, PartialEq, Debug)] +#[cfg_attr(test, derive(ts_rs::TS))] +#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub struct Coin { amount: String, denom: Denom, diff --git a/tauri-wallet/src-tauri/src/main.rs b/tauri-wallet/src-tauri/src/main.rs index 8ac9f6c423..4afb247bfc 100644 --- a/tauri-wallet/src-tauri/src/main.rs +++ b/tauri-wallet/src-tauri/src/main.rs @@ -7,7 +7,6 @@ use mixnet_contract::{Gateway, MixNode}; use std::sync::Arc; use tauri::{Menu, MenuItem}; use tokio::sync::RwLock; -use ts_rs::export; use validator_client::nymd::fee_helpers::Operation; mod coin; @@ -70,16 +69,19 @@ fn main() { .expect("error while running tauri application"); } -export! { - MixNode => "../src/types/rust/mixnode.ts", - Coin => "../src/types/rust/coin.ts", - Balance => "../src/types/rust/balance.ts", - Gateway => "../src/types/rust/gateway.ts", - TauriTxResult => "../src/types/rust/tauritxresult.ts", - TransactionDetails => "../src/types/rust/transactiondetails.ts", - Operation => "../src/types/rust/operation.ts", - Denom => "../src/types/rust/denom.ts", - DelegationResult => "../src/types/rust/delegationresult.ts", - Account => "../src/types/rust/account.ts", - TauriStateParams => "../src/types/rust/stateparams.ts" +#[cfg(test)] +mod test { + ts_rs::export! { + mixnet_contract::MixNode => "../src/types/rust/mixnode.ts", + crate::Coin => "../src/types/rust/coin.ts", + crate::Balance => "../src/types/rust/balance.ts", + mixnet_contract::Gateway => "../src/types/rust/gateway.ts", + crate::TauriTxResult => "../src/types/rust/tauritxresult.ts", + crate::TransactionDetails => "../src/types/rust/transactiondetails.ts", + validator_client::nymd::fee_helpers::Operation => "../src/types/rust/operation.ts", + crate::Denom => "../src/types/rust/denom.ts", + crate::DelegationResult => "../src/types/rust/delegationresult.ts", + crate::Account => "../src/types/rust/account.ts", + crate::TauriStateParams => "../src/types/rust/stateparams.ts" + } } diff --git a/tauri-wallet/src-tauri/src/operations/account.rs b/tauri-wallet/src-tauri/src/operations/account.rs index 675fdf2b61..a359df60d8 100644 --- a/tauri-wallet/src-tauri/src/operations/account.rs +++ b/tauri-wallet/src-tauri/src/operations/account.rs @@ -8,10 +8,10 @@ use serde::{Deserialize, Serialize}; use std::str::FromStr; use std::sync::Arc; use tokio::sync::RwLock; -use ts_rs::TS; use validator_client::nymd::{AccountId, NymdClient, SigningNymdClient}; -#[derive(TS, Serialize, Deserialize)] +#[cfg_attr(test, derive(ts_rs::TS))] +#[derive(Serialize, Deserialize)] pub struct Account { contract_address: String, client_address: String, @@ -19,7 +19,8 @@ pub struct Account { mnemonic: Option, } -#[derive(TS, Serialize, Deserialize)] +#[cfg_attr(test, derive(ts_rs::TS))] +#[derive(Serialize, Deserialize)] pub struct Balance { coin: Coin, printable_balance: String, diff --git a/tauri-wallet/src-tauri/src/operations/admin.rs b/tauri-wallet/src-tauri/src/operations/admin.rs index 0c9db7a115..a98e180437 100644 --- a/tauri-wallet/src-tauri/src/operations/admin.rs +++ b/tauri-wallet/src-tauri/src/operations/admin.rs @@ -8,9 +8,9 @@ use std::convert::{TryFrom, TryInto}; use std::str::FromStr; use std::sync::Arc; use tokio::sync::RwLock; -use ts_rs::TS; -#[derive(Serialize, Deserialize, TS)] +#[cfg_attr(test, derive(ts_rs::TS))] +#[derive(Serialize, Deserialize)] pub struct TauriStateParams { epoch_length: u32, minimum_mixnode_bond: String, diff --git a/tauri-wallet/src-tauri/src/operations/delegate.rs b/tauri-wallet/src-tauri/src/operations/delegate.rs index a9c9a75269..e746e715db 100644 --- a/tauri-wallet/src-tauri/src/operations/delegate.rs +++ b/tauri-wallet/src-tauri/src/operations/delegate.rs @@ -7,9 +7,9 @@ use serde::{Deserialize, Serialize}; use std::convert::TryInto; use std::sync::Arc; use tokio::sync::RwLock; -use ts_rs::TS; -#[derive(TS, Serialize, Deserialize)] +#[cfg_attr(test, derive(ts_rs::TS))] +#[derive(Serialize, Deserialize)] pub struct DelegationResult { source_address: String, target_address: String, diff --git a/tauri-wallet/src-tauri/src/operations/send.rs b/tauri-wallet/src-tauri/src/operations/send.rs index bf223a9c39..a94b9cbda9 100644 --- a/tauri-wallet/src-tauri/src/operations/send.rs +++ b/tauri-wallet/src-tauri/src/operations/send.rs @@ -7,10 +7,10 @@ use std::str::FromStr; use std::sync::Arc; use tendermint_rpc::endpoint::broadcast::tx_commit::Response; use tokio::sync::RwLock; -use ts_rs::TS; use validator_client::nymd::{AccountId, CosmosCoin}; -#[derive(Deserialize, Serialize, TS)] +#[cfg_attr(test, derive(ts_rs::TS))] +#[derive(Deserialize, Serialize)] pub struct TauriTxResult { code: u32, gas_wanted: u64, @@ -19,7 +19,8 @@ pub struct TauriTxResult { details: TransactionDetails, } -#[derive(Deserialize, Serialize, TS)] +#[cfg_attr(test, derive(ts_rs::TS))] +#[derive(Deserialize, Serialize)] pub struct TransactionDetails { from_address: String, to_address: String, diff --git a/tauri-wallet/src/types/rust/tauritxresult.ts b/tauri-wallet/src/types/rust/tauritxresult.ts index 92d812300f..5f4ebf3fb0 100644 --- a/tauri-wallet/src/types/rust/tauritxresult.ts +++ b/tauri-wallet/src/types/rust/tauritxresult.ts @@ -2,8 +2,8 @@ import { TransactionDetails } from "./transactiondetails"; export interface TauriTxResult { code: number; - gas_wanted: number; - gas_used: number; - block_height: number; + gas_wanted: bigint; + gas_used: bigint; + block_height: bigint; details: TransactionDetails; } \ No newline at end of file From eb6949528a7014a0a7fe9f18ac8fd92b1967d733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan-=C8=98tefan=20Neac=C5=9Fu?= Date: Thu, 11 Nov 2021 12:36:43 +0200 Subject: [PATCH 4/4] Fix network monitor template (#892) --- validator-api/src/config/template.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/validator-api/src/config/template.rs b/validator-api/src/config/template.rs index 96cae891bc..7526d23ad1 100644 --- a/validator-api/src/config/template.rs +++ b/validator-api/src/config/template.rs @@ -61,7 +61,7 @@ packet_delivery_timeout = '{{ network_monitor.packet_delivery_timeout }}' # Path to directory containing public/private keys used for bandwidth token purchase. # Those are saved in case of emergency, to be able to reclaim bandwidth tokens. # The public key is the name of the file, while the private key is the content. -backup_bandwidth_token_keys_dir = '{{ client.backup_bandwidth_token_keys_dir }}' +backup_bandwidth_token_keys_dir = '{{ network_monitor.backup_bandwidth_token_keys_dir }}' # Ethereum private key. eth_private_key = '{{ network_monitor.eth_private_key }}'