diff --git a/tauri-wallet/README.md b/tauri-wallet/README.md index 465cd18132..5cd0fdd60a 100644 --- a/tauri-wallet/README.md +++ b/tauri-wallet/README.md @@ -7,12 +7,19 @@ SPDX-License-Identifier: Apache-2.0 A Rust and Tauri desktop wallet implementation. -## Installation prerequisites +## Installation prerequisites Linux / Mac - `Yarn` - `NodeJS >= v16.8.0` - `Rust & cargo >= v1.51` +## Installation prerequisites Windows + +- When running on Windows you will need to install c++ build tools +- An easy guide to get rust up and running [Installation]("http://kennykerr.ca/2019/11/18/rust-getting-started/") +- When installing NodeJS please use the `current features` version +- Using a package manager like [Chocolatey]("chocolatey.org") is recommended + ## Installation Inside of the `tauri-wallet` folder, run the following commands diff --git a/tauri-wallet/src/components/Confirmation.tsx b/tauri-wallet/src/components/Confirmation.tsx index 87c570b84c..e227021d0b 100644 --- a/tauri-wallet/src/components/Confirmation.tsx +++ b/tauri-wallet/src/components/Confirmation.tsx @@ -33,7 +33,7 @@ export const Confirmation = ({ {error === null ? ( SuccessMessage ) : ( - + {error.name} {failureMessage} - {error.message} diff --git a/tauri-wallet/src/components/CopyToClipboard.tsx b/tauri-wallet/src/components/CopyToClipboard.tsx index c09edfe287..9e4cd4ae71 100644 --- a/tauri-wallet/src/components/CopyToClipboard.tsx +++ b/tauri-wallet/src/components/CopyToClipboard.tsx @@ -40,7 +40,7 @@ export const CopyToClipboard = ({ text }: { text: string }) => { size="small" variant={copied ? 'text' : 'outlined'} aria-label="save" - data-testid="copyButton" + data-testid="copy-button" onClick={() => handleCopy({ text, cb: updateCopyStatus })} endIcon={copied && } style={copied ? { background: green[500], color: 'white' } : {}} diff --git a/tauri-wallet/src/components/Error.tsx b/tauri-wallet/src/components/Error.tsx index cb211269d4..d1947bac31 100644 --- a/tauri-wallet/src/components/Error.tsx +++ b/tauri-wallet/src/components/Error.tsx @@ -6,11 +6,11 @@ import { Button } from '@material-ui/core' export const ErrorFallback = ({ error, resetErrorBoundary }: FallbackProps) => { return (
- + {error.name} {error.message} - + Stack trace {error.stack} diff --git a/tauri-wallet/src/components/Nav.tsx b/tauri-wallet/src/components/Nav.tsx index ba60e4d162..4af636f53f 100644 --- a/tauri-wallet/src/components/Nav.tsx +++ b/tauri-wallet/src/components/Nav.tsx @@ -131,7 +131,7 @@ export const Nav = () => { )} - + { noPadding Action={ - + @@ -43,7 +43,7 @@ export const BalanceCard = () => { {getBalance.error} ) : ( - + {getBalance.balance?.printable_balance} )} @@ -71,7 +71,7 @@ export const AddressCard = () => { title="Address" subheader="Wallet payments address" noPadding - data-testid="walletAddressHeader" + data-testid="wallet-address-header" Action={ @@ -107,7 +107,7 @@ export const AddressCard = () => { } > - {truncate(clientDetails?.client_address!, 35)} diff --git a/tauri-wallet/src/components/NoClientError.tsx b/tauri-wallet/src/components/NoClientError.tsx index b703832aee..cf65ae0904 100644 --- a/tauri-wallet/src/components/NoClientError.tsx +++ b/tauri-wallet/src/components/NoClientError.tsx @@ -5,7 +5,7 @@ import { Alert, AlertTitle } from '@material-ui/lab' export const NoClientError = () => { return ( - No client detected + No client detected Have you signed in? Try to go back to{' '} the main page and try again diff --git a/tauri-wallet/src/components/NodeTypeSelector.tsx b/tauri-wallet/src/components/NodeTypeSelector.tsx index 3f068680b3..e36432a637 100644 --- a/tauri-wallet/src/components/NodeTypeSelector.tsx +++ b/tauri-wallet/src/components/NodeTypeSelector.tsx @@ -34,13 +34,13 @@ export const NodeTypeSelector = ({ value={EnumNodeType.mixnode} control={} label="Mixnode" - data-testid="mixNode" + data-testid="mix-node" disabled={disabled} /> } - data-testid="gateWay" + data-testid="gate-way" label="Gateway" disabled={disabled} /> diff --git a/tauri-wallet/src/components/NymCard.tsx b/tauri-wallet/src/components/NymCard.tsx index c77fe38359..162610b15b 100644 --- a/tauri-wallet/src/components/NymCard.tsx +++ b/tauri-wallet/src/components/NymCard.tsx @@ -13,6 +13,7 @@ export const NymCard: React.FC<{ { size="small" color="primary" type="submit" + data-testid="refresh-button" onClick={fetchBalance} disabled={isLoading} disableElevation @@ -31,13 +32,13 @@ export const Balance = () => { return ( - + {error && ( } style={{ padding: theme.spacing(2) }} > @@ -47,7 +48,7 @@ export const Balance = () => { {!error && ( } > diff --git a/tauri-wallet/src/routes/bond/BondForm.tsx b/tauri-wallet/src/routes/bond/BondForm.tsx index 06936f86ee..ea689aa7db 100644 --- a/tauri-wallet/src/routes/bond/BondForm.tsx +++ b/tauri-wallet/src/routes/bond/BondForm.tsx @@ -142,7 +142,7 @@ export const BondForm = ({ {fees && ( - + {`A fee of ${ watchNodeType === EnumNodeType.mixnode ? fees.mixnode.amount @@ -369,7 +369,7 @@ export const BondForm = ({ color="primary" type="submit" size="large" - data-testid="submitButton" + data-testid="submit-button" disableElevation onClick={handleSubmit(onSubmit)} endIcon={isSubmitting && } diff --git a/tauri-wallet/src/routes/bond/index.tsx b/tauri-wallet/src/routes/bond/index.tsx index cf11a2c712..0e89ae070f 100644 --- a/tauri-wallet/src/routes/bond/index.tsx +++ b/tauri-wallet/src/routes/bond/index.tsx @@ -94,10 +94,10 @@ export const Bond = () => { Successfully bonded node + Successfully bonded node } Error={ - + An error occurred with the request: {message} } diff --git a/tauri-wallet/src/routes/delegate/DelegateForm.tsx b/tauri-wallet/src/routes/delegate/DelegateForm.tsx index 2aabc04ae7..0a32c08395 100644 --- a/tauri-wallet/src/routes/delegate/DelegateForm.tsx +++ b/tauri-wallet/src/routes/delegate/DelegateForm.tsx @@ -97,7 +97,7 @@ export const DelegateForm = ({ /> - + {`A fee of ${ watchNodeType === EnumNodeType.mixnode ? fees.mixnode.amount @@ -153,7 +153,7 @@ export const DelegateForm = ({
- {data.to_address} + {data.to_address}
@@ -70,7 +70,7 @@ export const SendConfirmation = ({
- {data.amount.amount + ' punks'} + {data.amount.amount + ' punks'}
diff --git a/tauri-wallet/src/routes/send/SendError.tsx b/tauri-wallet/src/routes/send/SendError.tsx index 644067e432..f90c9b9df5 100644 --- a/tauri-wallet/src/routes/send/SendError.tsx +++ b/tauri-wallet/src/routes/send/SendError.tsx @@ -37,7 +37,7 @@ export const SendError = ({ message }: { message?: string }) => { variant="outlined" style={{ width: '100%', padding: theme.spacing(2) }} > - + An error occured during the request {message} diff --git a/tauri-wallet/src/routes/send/SendReview.tsx b/tauri-wallet/src/routes/send/SendReview.tsx index 0b31454d3d..b51edc1626 100644 --- a/tauri-wallet/src/routes/send/SendReview.tsx +++ b/tauri-wallet/src/routes/send/SendReview.tsx @@ -44,19 +44,19 @@ export const SendReview = () => { ) : ( - + - + - + @@ -65,7 +65,6 @@ export const SendReview = () => { @@ -87,7 +86,7 @@ export const SendReviewField = ({ {title} - {subtitle} + {subtitle} ) } diff --git a/tauri-wallet/src/routes/send/SendWizard.tsx b/tauri-wallet/src/routes/send/SendWizard.tsx index 65ed2f9c97..2f41946157 100644 --- a/tauri-wallet/src/routes/send/SendWizard.tsx +++ b/tauri-wallet/src/routes/send/SendWizard.tsx @@ -148,7 +148,7 @@ export const SendWizard = () => { disableElevation style={{ marginRight: theme.spacing(1) }} onClick={handlePreviousStep} - data-testid="backButton" + data-testid="back-button" > Back diff --git a/tauri-wallet/src/routes/sign-in.tsx b/tauri-wallet/src/routes/sign-in.tsx index 14670f9b63..0cbac9f2ac 100644 --- a/tauri-wallet/src/routes/sign-in.tsx +++ b/tauri-wallet/src/routes/sign-in.tsx @@ -100,7 +100,7 @@ const SignInContent = ({ return ( <> - Sign in + Sign in
@@ -239,7 +239,7 @@ const CreateAccountContent = ({ showSignIn }: { showSignIn: () => void }) => { /> Wallet setup complete - + Please store your mnemonic in a safe place. You'll need it to access your wallet @@ -257,7 +257,7 @@ const CreateAccountContent = ({ showSignIn }: { showSignIn: () => void }) => { - {accountDetails.mnemonic} + {accountDetails.mnemonic}
@@ -273,7 +273,7 @@ const CreateAccountContent = ({ showSignIn }: { showSignIn: () => void }) => { - {accountDetails.client_address} + {accountDetails.client_address} @@ -293,7 +293,7 @@ const CreateAccountContent = ({ showSignIn }: { showSignIn: () => void }) => { variant="contained" color="primary" type="submit" - data-testid="createButton" + data-testid="create-button" disableElevation style={{ marginBottom: theme.spacing(1) }} disabled={isLoading} @@ -305,7 +305,7 @@ const CreateAccountContent = ({ showSignIn }: { showSignIn: () => void }) => { fullWidth variant="text" onClick={showSignIn} - data-testid="signInButton" + data-testid="sign-in-button" startIcon={} > Sign in diff --git a/tauri-wallet/src/routes/unbond/index.tsx b/tauri-wallet/src/routes/unbond/index.tsx index 36b7756603..2edca71138 100644 --- a/tauri-wallet/src/routes/unbond/index.tsx +++ b/tauri-wallet/src/routes/unbond/index.tsx @@ -29,10 +29,10 @@ export const Unbond = () => { {ownership?.hasOwnership && ( { setIsLoading(true) @@ -50,7 +50,7 @@ export const Unbond = () => { )} {!ownership.hasOwnership && ( - + You don't currently have a bonded node )} diff --git a/tauri-wallet/src/routes/undelegate/UndelegateForm.tsx b/tauri-wallet/src/routes/undelegate/UndelegateForm.tsx index f897851da0..4be7bacf45 100644 --- a/tauri-wallet/src/routes/undelegate/UndelegateForm.tsx +++ b/tauri-wallet/src/routes/undelegate/UndelegateForm.tsx @@ -84,7 +84,7 @@ export const UndelegateForm = ({ /> - + {`A fee of ${ watchNodeType === EnumNodeType.mixnode ? fees.mixnode.amount @@ -140,7 +140,7 @@ export const UndelegateForm = ({ variant="contained" color="primary" type="submit" - data-testid="submitButton" + data-testid="submit-button" disableElevation disabled={isSubmitting} endIcon={isSubmitting && } diff --git a/tauri-wallet/src/routes/undelegate/index.tsx b/tauri-wallet/src/routes/undelegate/index.tsx index bd9208f1ba..98b6319b08 100644 --- a/tauri-wallet/src/routes/undelegate/index.tsx +++ b/tauri-wallet/src/routes/undelegate/index.tsx @@ -102,14 +102,14 @@ export const Undelegate = () => { + An error occurred with the request: {message} } Success={ {' '} - Undelegation complete + Undelegation complete {message} } @@ -125,7 +125,7 @@ export const Undelegate = () => { }} >