Skip to content
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

Implement add account with recovery phrase flow - Closes #4302 #4329

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b8c6e92
implemented add account page
eniolam1000752 May 25, 2022
fc74eeb
Merge branch 'feature/blockchain-agnostic-new' into 4302-implement-ad…
eniolam1000752 May 25, 2022
07a26e9
implemented and linked add account form
eniolam1000752 May 27, 2022
775cc3c
Merge branch '4302-implement-add-account-with-recovery-phrase-flow' o…
eniolam1000752 May 27, 2022
5cc27a1
made add account a multi step flow
eniolam1000752 May 27, 2022
77ee278
added test for addAccountChoice
eniolam1000752 May 30, 2022
c9c1fdd
Merge branch 'feature/blockchain-agnostic-new' into 4302-implement-ad…
eniolam1000752 May 30, 2022
c6ea27a
implemented unit test to addAccount form
eniolam1000752 May 31, 2022
4287d86
Merge branch '4302-implement-add-account-with-recovery-phrase-flow' o…
eniolam1000752 May 31, 2022
c411e0e
fixed merge conflict
eniolam1000752 May 31, 2022
a6d3810
linked up password set success component to the flow
eniolam1000752 Jun 1, 2022
926b634
Merge branch 'feature/blockchain-agnostic-new' into 4302-implement-ad…
eniolam1000752 Jun 1, 2022
7b51f4f
reverted modal flow to full multi step
eniolam1000752 Jun 2, 2022
c3bc0fb
reverted jest config
eniolam1000752 Jun 2, 2022
f21c92d
Merge branch '4302-implement-add-account-with-recovery-phrase-flow' o…
eniolam1000752 Jun 2, 2022
1b7ec1a
reveted jest config and fixed failing unit tests
eniolam1000752 Jun 2, 2022
9a931a5
fixed lint error
eniolam1000752 Jun 2, 2022
aaaaedc
changed accountSelect -> manageAccount in all instance
eniolam1000752 Jun 2, 2022
d7ac797
:recycle: Refactor account management
Jun 2, 2022
978e8bb
feat: add useCurrentAccount mock from gad pr
soroushm Jun 3, 2022
78a31db
feat: add useEncryptionAccount mock
soroushm Jun 3, 2022
698789b
chore: fix setpasswordForm encryption
soroushm Jun 3, 2022
82f8b93
chore: fix SetPasswordSuccess file names
soroushm Jun 3, 2022
ecf90c3
chore: change account init route
soroushm Jun 3, 2022
6bb88fb
feat: add useCurrentAccount functionality, fix add flow
soroushm Jun 3, 2022
e7ab06b
feat: added test for account reducer and action
eniolam1000752 Jun 3, 2022
6ed0b14
fixed failing unit tests
eniolam1000752 Jun 3, 2022
d4169aa
added test to selectors
eniolam1000752 Jun 3, 2022
f13f81e
Merge branch 'feature/blockchain-agnostic-new' into 4302-implement-ad…
ManuGowda Jun 3, 2022
a94eb01
fixed test coverage issues
eniolam1000752 Jun 3, 2022
2e5b0b0
Merge branch '4302-implement-add-account-with-recovery-phrase-flow' o…
eniolam1000752 Jun 3, 2022
0d74b60
fixed lint issues
eniolam1000752 Jun 3, 2022
56244b2
added unit test and istanbul ignore to addAccount
eniolam1000752 Jun 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
666 changes: 9 additions & 657 deletions app/package-lock.json

Large diffs are not rendered by default.

51,579 changes: 237 additions & 51,342 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/common/store/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export { default as voting } from '@dpos/validator/store/reducers/voting';
export { default as watchList } from '@dpos/validator/store/reducers/watchList';
export { default as service } from './service';
export { default as loading } from './loading';
export { account } from 'src/modules/account/store/reducer';
100 changes: 58 additions & 42 deletions packages/views/screens/router/routes.js
Original file line number Diff line number Diff line change
@@ -1,77 +1,72 @@
export default {
wallet: {
path: '/wallet',
isPrivate: true,
exact: false,
forbiddenTokens: [],
},
addAccount: {
path: '/add-account',
isPrivate: false,
forbiddenTokens: [],
},
explorer: {
path: '/explorer',
searchParam: 'address',
addAccountBySecretRecovery: {
path: '/account/add/secrete-recovery',
isPrivate: false,
forbiddenTokens: [],
exact: true,
},
hwWallet: {
path: '/hw-wallet-login',
isSigninFlow: true,
addAccountOptions: {
path: '/account',
isPrivate: false,
forbiddenTokens: [],
exact: true,
},
register: {
path: '/register',
block: {
path: '/block',
searchParam: 'id',
isPrivate: false,
isSigninFlow: true,
exact: true,
forbiddenTokens: [],
},
login: {
path: '/login',
blocks: {
path: '/blocks',
isPrivate: false,
isSigninFlow: true,
exact: true,
forbiddenTokens: [],
},
termsOfUse: {
path: '/terms-of-use',
dashboard: {
path: '/',
isPrivate: false,
isSigninFlow: true,
forbiddenTokens: [],
exact: true,
},
transactions: {
path: '/transactions',
delegates: {
path: '/delegates',
exact: true,
isPrivate: false,
forbiddenTokens: [],
},
blocks: {
path: '/blocks',
explorer: {
path: '/explorer',
searchParam: 'address',
isPrivate: false,
exact: true,
forbiddenTokens: [],
},
block: {
path: '/block',
searchParam: 'id',
hwWallet: {
path: '/hw-wallet-login',
isSigninFlow: true,
isPrivate: false,
exact: true,
forbiddenTokens: [],
},
wallets: {
path: '/wallets',
login: {
path: '/login',
isPrivate: false,
isSigninFlow: true,
exact: true,
forbiddenTokens: [],
},
network: {
path: '/network',
manageAccounts: {
path: '/account/manage',
isPrivate: false,
forbiddenTokens: [],
},
delegates: {
path: '/delegates',
exact: true,
network: {
path: '/network',
isPrivate: false,
forbiddenTokens: [],
},
Expand All @@ -80,16 +75,33 @@ export default {
isPrivate: true,
forbiddenTokens: [],
},
accountSelect: {
path: '/account/manage',
register: {
path: '/register',
isPrivate: false,
isSigninFlow: true,
forbiddenTokens: [],
},
dashboard: {
path: '/',
termsOfUse: {
path: '/terms-of-use',
isPrivate: false,
isSigninFlow: true,
forbiddenTokens: [],
},
transactions: {
path: '/transactions',
isPrivate: false,
forbiddenTokens: [],
exact: true,
},
wallets: {
path: '/wallets',
isPrivate: false,
forbiddenTokens: [],
},
wallet: {
path: '/wallet',
isPrivate: true,
exact: false,
forbiddenTokens: [],
},
};

Expand Down Expand Up @@ -174,4 +186,8 @@ export const modals = {
isPrivate: false,
forbiddenTokens: [],
},
setPassword: {
isPrivate: false,
forbiddenTokens: [],
},
};
10 changes: 8 additions & 2 deletions packages/views/screens/router/routesMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ import ReclaimBalanceModal from '@legacy/manager/reclaimBalanceModal';
import RegisterMultisig from '@wallet/manager/registerMultisigManager';
import SignMultiSig from '@wallet/manager/signMultisigManager';
import MultisigAccountDetails from '@wallet/manager/multisigAccountDetailsManager';
import AccountSelect from '@account/components/AccountSelect';
import ManageAccounts from '@account/components/ManageAccounts';
import AddAccountOptions from '@account/components/AddAccountOptions';
import AddAccountBySecretRecovery from 'src/modules/account/components/AddAccountBySecretRecovery';
import AddAccountForm from '@account/components/AddAccountForm';

export default {
wallet: AccountDetails,
Expand Down Expand Up @@ -70,5 +73,8 @@ export default {
multiSignature: RegisterMultisig,
multisigAccountDetails: MultisigAccountDetails,
signMultiSignTransaction: SignMultiSig,
accountSelect: AccountSelect,
manageAccounts: ManageAccounts,
addAccountOptions: AddAccountOptions,
accountAdd: AddAccountForm,
addAccountBySecretRecovery: AddAccountBySecretRecovery,
};
5 changes: 5 additions & 0 deletions setup/react/assets/images/icons/account-upload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions setup/react/assets/images/icons/download-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions setup/react/assets/images/icons/secret-passphrase.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
"Account public key": "Account public key",
"Account username": "Account username",
"Accounts": "Accounts",
"Active delegates": "Active delegates",
"Add": "Add",
"Add account": "Add account",
"Add another account": "Add another account",
"Add bookmark": "Add bookmark",
"Add new": "Add new",
"Add to votes": "Add to votes",
"Add to watched": "Add to watched",
"Add vote": "Add vote",
"Added votes": "Added votes",
"Address": "Address",
Expand Down Expand Up @@ -47,6 +49,7 @@
"Apply filters": "Apply filters",
"Auto sign out": "Auto sign out",
"Available balance for voting": "Available balance for voting",
"Awaiting slot": "Awaiting slot",
"Back": "Back",
"Back to wallet": "Back to wallet",
"Balance": "Balance",
Expand All @@ -60,6 +63,7 @@
"Block details": "Block details",
"Block height": "Block height",
"Blocks": "Blocks",
"Blocks forged": "Blocks forged",
"Blocks overview": "Blocks overview",
"Bookmarks": "Bookmarks",
"Cancel": "Cancel",
Expand Down Expand Up @@ -115,7 +119,10 @@
"Delegate profile": "Delegate profile",
"Delegate registration succeeded": "Delegate registration succeeded",
"Delegate registration summary": "Delegate registration summary",
"Delegate weight": "Delegate weight",
"Delegates": "Delegates",
"Delegates overview": "Delegates overview",
"Delegation status": "Delegation status",
"Depending on the number of votes locked to your account (delegate weight), your account can become eligible to forge new blocks on the Lisk blockchain. With every new round (103 blocks), the top 101 active delegates and 2 randomly selected standby delegates each become eligible to forge a new block. For each block forged and accepted by the Lisk network, a delegate receives a new block reward and the transaction fees collected from each sender. The minimum required delegate weight to become eligible is 1000 LSK.": "Depending on the number of votes locked to your account (delegate weight), your account can become eligible to forge new blocks on the Lisk blockchain. With every new round (103 blocks), the top 101 active delegates and 2 randomly selected standby delegates each become eligible to forge a new block. For each block forged and accepted by the Lisk network, a delegate receives a new block reward and the transaction fees collected from each sender. The minimum required delegate weight to become eligible is 1000 LSK.",
"Deposit at least {{amount}} LSK to your new account": "Deposit at least {{amount}} LSK to your new account",
"Details": "Details",
Expand All @@ -126,6 +133,7 @@
"Discreet mode": "Discreet mode",
"Does the problem still persist?": "Does the problem still persist?",
"Done": "Done",
"Don’t have a Lisk account yet?": "Don’t have a Lisk account yet?",
"Download": "Download",
"Download completed": "Download completed",
"Duplicate public keys detected.": "Duplicate public keys detected.",
Expand Down Expand Up @@ -153,11 +161,17 @@
"Fee": "Fee",
"Filter": "Filter",
"Filter by name or address...": "Filter by name or address...",
"Filter by name...": "Filter by name...",
"Filtered results: {{results}}": "Filtered results: {{results}}",
"Forged": "Forged",
"Forging": "Forging",
"Forging details": "Forging details",
"Forging time": "Forging time",
"Forging totals": "Forging totals",
"From": "From",
"Generated by": "Generated by",
"German": "German",
"Go Back": "Go Back",
"Go back": "Go back",
"Go to confirmation": "Go to confirmation",
"Go to dashboard": "Go to dashboard",
Expand Down Expand Up @@ -188,6 +202,7 @@
"Insert public key": "Insert public key",
"Insert signature": "Insert signature",
"Insert vote amount": "Insert vote amount",
"Inside round": "Inside round",
"Install update": "Install update",
"Invalid address": "Invalid address",
"Invalid address or public key": "Invalid address or public key",
Expand All @@ -198,6 +213,7 @@
"Label is too long, Max. 20 characters": "Label is too long, Max. 20 characters",
"Label is too long.": "Label is too long.",
"Last {{num}} blocks": "Last {{num}} blocks",
"Latest votes": "Latest votes",
"Less filters": "Less filters",
"Lisk": "Lisk",
"Lisk Terms of Use": "Lisk Terms of Use",
Expand Down Expand Up @@ -225,6 +241,7 @@
"Message": "Message",
"Min": "Min",
"Minimize": "Minimize",
"Missed slot": "Missed slot",
"Modify recovery phrase derivation path": "Modify recovery phrase derivation path",
"More filters": "More filters",
"Multisignature account details": "Multisignature account details",
Expand All @@ -237,12 +254,15 @@
"New bookmark": "New bookmark",
"New transactions": "New transactions",
"New vote amount": "New vote amount",
"Next forgers": "Next forgers",
"No connectivity information": "No connectivity information",
"No delegates information": "No delegates information",
"No height information": "No height information",
"No transactions yet": "No transactions yet",
"No updates": "No updates",
"No version information": "No version information",
"No votes in queue.": "No votes in queue.",
"No {{activeTab}} delegates found.": "No {{activeTab}} delegates found.",
"Nonce": "Nonce",
"Not empty": "Not empty",
"Nothing available to unlock": "Nothing available to unlock",
Expand All @@ -258,6 +278,7 @@
"Opt-in to sharing anonymous data in order to improve Lisk.": "Opt-in to sharing anonymous data in order to improve Lisk.",
"Optional": "Optional",
"Others": "Others",
"Outside round": "Outside round",
"Owner": "Owner",
"Passphrase": "Passphrase",
"Passphrase is not valid": "Passphrase is not valid",
Expand Down Expand Up @@ -307,6 +328,7 @@
"Register delegate": "Register delegate",
"Register multisignature account": "Register multisignature account",
"Register multisignature group": "Register multisignature group",
"Registered delegates": "Registered delegates",
"Registrant": "Registrant",
"Reject": "Reject",
"Release notes": "Release notes",
Expand All @@ -316,6 +338,7 @@
"Remind me later": "Remind me later",
"Remove": "Remove",
"Remove an account": "Remove an account",
"Remove from watched": "Remove from watched",
"Remove vote": "Remove vote",
"Removed votes": "Removed votes",
"Report delegate misbehaviour": "Report delegate misbehaviour",
Expand All @@ -330,6 +353,10 @@
"Restore your encrypted secret recovery phrase.": "Restore your encrypted secret recovery phrase.",
"Review and sign": "Review and sign",
"Reward": "Reward",
"Round state": "Round state",
"Round state:": "Round state:",
"Round status": "Round status",
"Sanctioned": "Sanctioned",
"Save": "Save",
"Save Account": "Save Account",
"Save changes": "Save changes",
Expand All @@ -342,6 +369,8 @@
"Secret recovery phrase": "Secret recovery phrase",
"Security": "Security",
"Select All": "Select All",
"Select Network": "Select Network",
"Select the applicable mode.": "Select the applicable mode.",
"Send": "Send",
"Send a reclaim transaction": "Send a reclaim transaction",
"Send using second passphrase right away": "Send using second passphrase right away",
Expand All @@ -367,7 +396,9 @@
"Signed": "Signed",
"Signed message": "Signed message",
"Since you want to reclaim your LSK on the new blockchain, you need to pay the fee from your new account.": "Since you want to reclaim your LSK on the new blockchain, you need to pay the fee from your new account.",
"Slot status": "Slot status",
"Sorry, we couldn’t find the page you were looking for. We suggest that you return to the main dashboard.": "Sorry, we couldn’t find the page you were looking for. We suggest that you return to the main dashboard.",
"Standby delegates": "Standby delegates",
"Status": "Status",
"Store this document in a safe place.": "Store this document in a safe place.",
"Submitting the transaction": "Submitting the transaction",
Expand All @@ -382,6 +413,7 @@
"The signature is correct": "The signature is correct",
"The signature is incorrect": "The signature is incorrect",
"The statistics shown only reflects peers connected to the current Lisk Service node.": "The statistics shown only reflects peers connected to the current Lisk Service node.",
"The total amount of votes received for a delegate.": "The total amount of votes received for a delegate.",
"The transaction is now fully signed": "The transaction is now fully signed",
"The transaction was not found.": "The transaction was not found.",
"The updated amount after voting": "The updated amount after voting",
Expand All @@ -393,6 +425,7 @@
"This account requires {{numberOfSignatures}} signatures to create a valid transaction.": "This account requires {{numberOfSignatures}} signatures to create a valid transaction.",
"This avatar will be linked to your new Lisk address.": "This avatar will be linked to your new Lisk address.",
"This delegate has been permanently banned": "This delegate has been permanently banned",
"This delegate will be punished in upcoming rounds": "This delegate will be punished in upcoming rounds",
"This is a legacy account and can not be used on this network.": "This is a legacy account and can not be used on this network.",
"This is a multisignature account that is controlled by a group of accounts.": "This is a multisignature account that is controlled by a group of accounts.",
"This is not a valid public key. Please enter the correct public key.": "This is not a valid public key. Please enter the correct public key.",
Expand Down Expand Up @@ -454,6 +487,7 @@
"Wallet address:": "Wallet address:",
"Wallet details": "Wallet details",
"Warning: Session Timeout": "Warning: Session Timeout",
"Watched": "Watched",
"We are proud to announce that Lisk Core v3 now contains new improved robust security features.": "We are proud to announce that Lisk Core v3 now contains new improved robust security features.",
"We kindly ask you to transfer your balance to the new account.": "We kindly ask you to transfer your balance to the new account.",
"What's New...": "What's New...",
Expand Down
1 change: 0 additions & 1 deletion src/modules/account/components/AccountSelect/index.js

This file was deleted.

Loading