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

Allow the user to add new accounts and switch to them #144

Merged
merged 13 commits into from
Feb 9, 2022

Conversation

jessgusclark
Copy link
Member

@jessgusclark jessgusclark commented Feb 7, 2022

Allows the user to switch to add accounts and switch to them. The UX is a bit rough but the functionality is there. I will wait for the updated design before continuing.

Screen Shot 2022-02-08 at 1 38 44 PM

other notable things

  • Deleting the keys and reimporting the app will result in only loading the first wallet (as expected).
  • Prior, an account needed to have a smartWallet deployed to connect to sockets, this was changed and will connect to any address.

expected conflicts

This PR will have conflicts with the following PRS:

BalanceScreen tests are being skipped.

I chose to skip the tests on the BalanceScreen for two reasons:

First, the BalanceScreen is an older screen that is only accessible from the Dev menu. In the near future this will be removed.
Second, and more importantly, the BalanceScreen should not rely on the RIFWalletSockets class. Rather, the component should take balances as a parameter and display them accordingly. The existing pattern makes it very difficult to reuse the component. A better solution would be to elevate the balances to the Core.tsx and pass it down to each component. We should do this, but since this screen will be deprecated soon it did not make sense to fix this here.

@jessgusclark jessgusclark changed the title [DRAFT] Allow the user to add new accounts and switch to them Allow the user to add new accounts and switch to them Feb 8, 2022
@jessgusclark jessgusclark marked this pull request as ready for review February 8, 2022 13:59
@ilanolkies ilanolkies added the core Core related label Feb 9, 2022
@ilanolkies ilanolkies added this to the v1.0.0 milestone Feb 9, 2022
Copy link
Contributor

@ilanolkies ilanolkies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LRGTM! Clean,

Deleting the keys and reimporting the app will result in only loading the first wallet (as expected)

We can build a strategy for recovery, iterating inspecting balances of nextWallet

will connect to any address

Cool 👍

I chose to skip the tests on the BalanceScreen for two reasons

Ok, agree. We need to work on that

@ilanolkies ilanolkies merged commit 8fb3d7c into develop Feb 9, 2022
ilanolkies added a commit that referenced this pull request Feb 10, 2022
* Section component to render options in settings

* Implementing sections

* Adding translate to section titles

* Adding props to setting screen

* Passing deleteKeys function down to the settings screen

* removing delete keys button

* Adding condition in case the key doesnt exist in the send screen and also deleting the deletekeys button from keysinfo screen

* Fixing test

* Allow the user to add new accounts and switch to them (#144)

* Add screen for managing current wallet.

* Pass addNewWallet to manage wallets screen.

* Allow the user to switch the selectedWallet in the core.

* Show addresses in manage screen.

* In sockets file, move connect() feature outside of the useEffect.

* combine functions into single useEffect and remove check for if wallet is deployed.

* Remove unused variables, add sockets method and use it.

* Add wallet and isDeployed to the list when clicking the button.

* Clean up addWallet code.

* Move next wallet creation to the operations file.

* Pass networkId

* Skipping these tests, see PR description.

* Export props and use in RootNavigation

* Enhancemnt/no usd value (#146)

* Adding not available message to the balance row component

* Linting

* Simplifying quota prop

* Update src/screens/home/BalanceRowComponent.tsx

* Make USD text smaller

Co-authored-by: Agustin Villalobos <agustin.villalobos@iovlabs.org>
Co-authored-by: Ilan <36084092+ilanolkies@users.noreply.github.com>
Co-authored-by: Ilan <ilanolkies@outlook.com>

* feat: connect faucets component (#139)

* feat: connect faucets component

* chore: add comment

* feat: add rbtc balance

* feat: add rbtc balance

* fix: refactor test

* chore: remove console

* fix: validate balances

* format: lint code

* fix: load rbtc balance with serInterval

* fix: move rbtc load code

* format: lint code

* fix: move code

* fix: remove duplicated line

* fix: add missing types

* fix: add todo comment

* fix: move timer

* fix: add different effect

* Fix balanceToString

Co-authored-by: Ilan <ilanolkies@outlook.com>

* Enhancement/live txs (#129)

* added live balances

* minor changes

* RIF Sockets Context

* URL based on platform and exporting rifWalletServicesUrl variable

* Adding socket.io-client

* Wrapping app with RIFSocketsProvider

* Implementing live prices

* Lifting state for activities/transactions

* Lifting balances state

* Lint

* Update src/core/setup.ts

Co-authored-by: Christian Escalante <chescalante.ar@gmail.com>

* Lint

* Fixing test

* Move service url to config

* connected home with tokens and transactions state

* fixed tests and added polimophic socket class (#121)

Co-authored-by: Christian Escalante <chescalante@gmail.com>

* Moved subscriptions instance to Core + added ABI Enhancer after receiving a transaction

* Lint

* Changing to new state structure

* Changing state structure to match enhanced transactions

* Implementing top 5 enhanced transactions

* Implementing FlatList component to render transactionsç

* Implementing FlatList to implement infinite scrolling

* Lint

* Fixing test

* Removing data array from the state structure, because its duplicating the txs

* Lint

* Sorting by timestamp

* Fixing sorting funciton

* Changing filtering to use hash since its unique

Co-authored-by: Christian Escalante <chescalante@gmail.com>
Co-authored-by: Agustin Villalobos <agustin.villalobos@iovlabs.org>
Co-authored-by: Christian Escalante <chescalante.ar@gmail.com>
Co-authored-by: Ilan <ilanolkies@outlook.com>
Co-authored-by: Ilan <36084092+ilanolkies@users.noreply.github.com>

* Update Active Row Component when balance/wallet changes (#148)

* Start working on storing a reference (contractAddress) rather than the object

* Clean up comments and use new value.

* Remove conosle.log

* Remove unnecessary filter and call address directly if available

* Section component to render options in settings

* Implementing sections

* Adding translate to section titles

* Adding props to setting screen

* Passing deleteKeys function down to the settings screen

* removing delete keys button

* Adding condition in case the key doesnt exist in the send screen and also deleting the deletekeys button from keysinfo screen

* Fixing test

* Implemenenting information section

* Rebasing Core

* Adding testing

* Add button to manage wallets.

Co-authored-by: Agustin Villalobos <agustin.villalobos@iovlabs.org>
Co-authored-by: Jesse Clark <hello@developerjesse.com>
Co-authored-by: Ilan <36084092+ilanolkies@users.noreply.github.com>
Co-authored-by: Ilan <ilanolkies@outlook.com>
Co-authored-by: Luis Chavarría <luis.chavarria@iovlabs.org>
Co-authored-by: Christian Escalante <chescalante@gmail.com>
Co-authored-by: Christian Escalante <chescalante.ar@gmail.com>
@jessgusclark jessgusclark deleted the create-account branch February 14, 2023 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants