-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix path for github action running tauri-wallet-tests #884
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
module.exports = { | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "14" | ||
} | ||
} | ||
] | ||
] | ||
} | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
node: "14", | ||
}, | ||
}, | ||
], | ||
], | ||
}; |
52 changes: 27 additions & 25 deletions
52
tauri-wallet/webdriver/common/constants/text-constants.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
} | ||
//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", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": "" | ||
} | ||
"mnemonic": "value", | ||
"punk_address": "", | ||
"receiver_address": "", | ||
"amount_to_send": "", | ||
"identity_key_to_delegate_mix_node": "", | ||
"identity_key_to_delegate_gateway": "", | ||
"delegate_amount": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
|
||
navigateAndClick = async (element) => { | ||
await element.click() | ||
} | ||
|
||
scrollIntoView = async (element) => { | ||
await element.scrollIntoView() | ||
//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]; | ||
} | ||
|
||
const currentBalance = beforeBalance.split(/\s+/)[0]; | ||
|
||
currentBalance = async (value) => { | ||
return parseFloat(value.split(/\s+/)[0].toString()).toFixed(5) | ||
} | ||
const castCurrentBalance = parseFloat(currentBalance).toFixed(5); | ||
const transCost = +parseFloat(amount) + +parseFloat(fee).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() | ||
module.exports = new Helpers(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
module.exports = new WalletBond(); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this should be an empty config?
Also, be careful only using
prettier
because the root of the project haseslint
(and no prettier). They will end up flip-flopping unless configured to work together. Look at https://prettier.io/docs/en/integrating-with-linters.html and use https://github.com/prettier/eslint-plugin-prettier to drive prettier.I'm wondering if we should maybe do that work in another PR? Because it will likely mean a lot of formatting changes to the wallet JS/TS code.