-
Notifications
You must be signed in to change notification settings - Fork 7
[wallet/symbol/mobile] feat: add AccountDetails, Send and Settings screens #1897
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
Open
OlegMakarenko
wants to merge
61
commits into
dev
Choose a base branch
from
wallet-symbol-mobile/home
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or 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
…ing, add more icons
…sAbout, SettingsNetwork, SettingsSecurity
…countAvatar, AccountView, add known account images, and helpers
…nAvatar, TokenView, add known token config, images, and helpers
…ng random account avatar images
…ledText component
…nputAmount and SelectToken
…pyView, EditViewContainer and MessageView
…screen, add pull-to-refresh option to Screen component
…move type to types directory
…ng sending transactions and polling confirmation status
… its inner components
…xtures, add more methods to ScreenTester, improve wallet controller mock
…rect type in TextBox
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The app lacks AccountDetails, Send, and Settings screens.
Solution
MAIN CHANGES:
1.1 AccountDetails - this screen displays account main information such as address, public key, chain & network and allows to reveal private key after entering passcode. It also has the block explorer link and for the testnet - the faucet link.
1.2 Send - this screen is responsible for sending transfer transactions. It has a form to input recipient address, select token, enter amount, message and select fees. Supports different chains and will be used by them later. The screen is using TransactionScreenTemplate component/template that handles all transaction-sending functionality. It uses wallet controller for signing and announcing transaction. Also it renders confirmation dialog before signing. It renders transaction status tracking dialog allowing users to see the current step of the transaction sending process - transaction creation, sign, announce and confirmation. If any error occurred - it shows its text next to errored step.
1.3 Settings - this screen displays a list of app settings. Some list items redirect to other screens for detailed configuration, and some execute actions directly on the screen such as - language selection, fiat currency selection and logout (removing all accounts from wallet controller and clearing cache (with confirmation dialog)).
1.4 SettingsAbout - this is a simple screen that displays app, symbol-sdk and react-native version from package.json and also display links to our github, twitter and discord (urls specified in the app config file).
1.5 SettingsNetwork - this screen allows to switch between mainnet and testnet and select the node - automatic selection or manually from the list (nodewatch). Below the selectors there are a table showing some basic network info - network identifier, connected node url, chain height, min. fee multiplier.
1.6 SettingsSecurity - this screen allows to enable or disable passcode confirmations and also has a component to reveal mnemonic seed phrase (after passcode confirmation if enabled).
Added account info to Home screen (AccountCardWidget).
SECONDARY CHANGES:
Component groups organized by role:
controls/- Interactive UI controls (buttons, inputs, selectors)display/- Display-only components, data type presentationfeatures/- Feature-specific complex components that use some logicfeedback/- User feedback components (modals, statuses, alerts)layout/- Layout and container components. Elements positioningtemplates/- Page templates, providing reusable functionalitytypography/- Text componentsvisual/- Visual elements (icons, images)Improved JS-Doc description for each component.
Added new components:
Added lib/blockie to generate account avatars based on the address. Lib is reused from Ethereum's Metamask. Refactor was done to make it more readable and converted to ES6 syntax to use in the wallet. Also added some configuration abilities via class constructor to setup color ranges to meet application color theme (hue, saturation and lightness).
Added test helpers, fixture builders, improved mocking functions.
Covered all new screens with tests. Added additional tests for components to reach the test coverage requirements.
Improved some existing screen tests - defined constants, etc to make it better readable and maintainable.
Refactor main root app component - App.js. Now it is located under src/app directory. Some logic is moved to internal hooks (src/app/hooks), RootLayout which defines app main layout is now in layout directory (src/app/layout). Improved component readability.
Setup account and token configs. Also defined their image resolutions. Now we can specify know accounts and tokens and resolve them by their address and token (mosaic) id into their name and image. Used in AccountView, AccountAvatar, TokenView and TokenAvatar components. To resolve this data need to first use resolution functions from utils/account and utils/token that return name and imageId if the entry is in the config.
Additional global hooks were added.