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

Enhancement/live txs #129

Merged
merged 42 commits into from
Feb 9, 2022
Merged

Enhancement/live txs #129

merged 42 commits into from
Feb 9, 2022

Conversation

agustin-v
Copy link
Contributor

Reafctor state for keep txs from the socket and from the API in one place.
Implemented FlatList component to render the transactions in the activity section within the DevMenu.
Implemented infinite scrolling using the FlatList.

Screen.Recording.2022-01-28.at.08.04.43.mov

Christian Escalante and others added 30 commits December 16, 2021 16:05
Co-authored-by: Christian Escalante <chescalante.ar@gmail.com>
connected home with tokens and transactions state
Co-authored-by: Christian Escalante <chescalante@gmail.com>
@agustin-v agustin-v marked this pull request as ready for review January 28, 2022 15:01
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.

Great job!

src/subscriptions/RIFSockets.tsx Outdated Show resolved Hide resolved
Copy link
Member

@jessgusclark jessgusclark left a comment

Choose a reason for hiding this comment

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

The app crashes if there are no balances or if it is a fresh account.

update: nevermind, this seems to be an existing error with the rif-wallet-service.

@jessgusclark
Copy link
Member

Found a small bug. If the token is selected then its balance does not get updated up top:

Screen Shot 2022-01-31 at 2 34 25 PM

It was updated in the portfolio section.

@ilanolkies
Copy link
Contributor

@jessgusclark seems like that was broken in another PR... will rise an issue

@ilanolkies ilanolkies added refactor Refactor services RIF Wallet Services tx Transactions labels Feb 1, 2022
@ilanolkies ilanolkies added this to the v1.0.0 milestone Feb 1, 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.

Just a little comment. Works perfect here

src/subscriptions/utils.ts Outdated Show resolved Hide resolved
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.

I don't see why we changed filterEnhancedTransactions instead of sortEnhancedTransactions. Transactions still appear in disorder when there is an incoming transactions, it is still ordering by nonce

First I see

Screen Shot 2022-02-08 at 10 20 11

After loading more txs

Screen Shot 2022-02-08 at 10 20 38

first: IActivityTransaction,
second: IActivityTransaction,
) => {
return second.originTransaction.nonce - first.originTransaction.nonce
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return second.originTransaction.nonce - first.originTransaction.nonce
return second.originTransaction.timestamp - first.originTransaction.timestamp

src/subscriptions/utils.ts Outdated Show resolved Hide resolved
@ilanolkies ilanolkies merged commit ed04ddf 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactor services RIF Wallet Services tx Transactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants