superhero-com / superhero-wallet

Superhero is a multi-blockchain wallet to manage crypto assets and navigate the web3 and DeFi space. Currently supporting Bitcoin, Ethereum and æternity blockchains.
https://wallet.superhero.com
ISC License
40 stars 39 forks source link

ui: support ERC-20 in transaction history #2531

Closed peronczyk closed 9 months ago

peronczyk commented 1 year ago

Acceptance criteria:

Includes the following:

Liubov-crypto commented 10 months ago
  1. The ERC-20 tokens transactions could disappear from time to time from The Latest Tx widget and from the transaction history on the Ethereum account detail page. I have to refresh the page to see them:

https://github.com/superhero-com/superhero-wallet/assets/69896204/00893c99-9863-440e-9e2a-cac397372572

https://github.com/superhero-com/superhero-wallet/assets/69896204/1683bbbb-59dc-483a-99a4-41b33b74b2fa

  1. Also the Transaction list could be not fully shown on ETH account detail page.

  2. Idk, if it's related to this task, but ERC-20 Txs are also displaying on coins/ethereum page in Transaction list because fee is paid in ETH:

https://github.com/superhero-com/superhero-wallet/assets/69896204/89cca758-2d4f-4550-89f6-75c06ee501f2

  1. The ERC-20 transactions could be displaying in The Latest Tx widget as ETH Tx from time to time (fee is paid in ETH). I have to refresh page to see them correctly:

https://github.com/superhero-com/superhero-wallet/assets/69896204/555a5d64-ae5e-4366-b1cc-ef5e7072576f

peronczyk commented 9 months ago

The task is ready to be retested @Liubov-crypto

Ad 1, 2 - this is related to the lack of reliability of the API. Sometimes the call is refused and empty list is returned. I'll create separate task for this. Maybe we will manage to react properly to wrong responses from the API. But I don't want to hold this task too long due to this issue.

Ad 3. As discussed during the meeting: now these 0 value (amount) transactions are filtered out (not displayed).

Ad 4. This is also related to the usage of the free ETH API which returns empty tokens list. We will tackle this within different task.

Please test every possible list of transactions as all of them are affected by the changes. Also closing/opening the extension should not break the lists.

Liubov-crypto commented 9 months ago

Besides the issue that Nikita found, I discovered next:

  1. I can see transactions from testnet in mainnet when I'm switching the network:

https://github.com/superhero-com/superhero-wallet/assets/69896204/36c41bd2-201b-4e05-81e8-fc51e33ee40a

  1. Maybe it's glitch but I see the same transaction twice in Tx list:

2 times

  1. The extension is starting "jumping" when I'm trying to reach out the end of Tx list:

https://github.com/superhero-com/superhero-wallet/assets/69896204/0aa7ffd8-3c96-4799-9576-05469b4c3f00

Not an issue, rather question:

is this new option? this text at the bottom when I've reached out the end of Tx list?

upd

peronczyk commented 9 months ago

I fixed mentioned issues @Liubov-crypto . Can you please retest? Regarding the last thing: the message in the end of the list: yes, this was discussed with Tsvetan. Sorry for not letting you aut about this new thing.

Liubov-crypto commented 9 months ago
  1. I can see transactions from testnet in mainnet when I'm switching the network - still reproducible for me:

https://github.com/superhero-com/superhero-wallet/assets/69896204/b52ad35e-68c1-40c7-88a3-3ee2a5312c6b

  1. Issue with displaying amount of "allow ae usage" :

tok

The rest issues have been fixed.

peronczyk commented 9 months ago

The issue for the transactions from testnet visible in mainnet is another thing related to the fact that we are using free version of ETH API. If user changes the network and the API reaches the maximum call amount the app is trying to avoid clearing the transaction list. This feature is related to @martinkaintas work. Until we have fully working API these kind of glitches will happen. Here's separate task for this: https://github.com/orgs/superhero-com/projects/2/views/2?pane=issue&itemId=52383948

Regarding the allowance amount calculation I also created separate task for this: https://github.com/orgs/superhero-com/projects/2/views/2?pane=issue&itemId=52386501

Do we have any other issues found there?

Liubov-crypto commented 9 months ago

I registered these 2 issues mentioned by me above separately.

I found that if I'm opening a Tx list on Token details page, then close the page and go open Tx list on ETH account page, I will see only ERC-20 tokens in Tx list. The same if I will open ETH Coin details Tx page, close it and go open Eth acc tx list, I will see only ETH transactions, and no one ERC-20 transaction.

https://github.com/superhero-com/superhero-wallet/assets/69896204/e5fd18f0-4c88-42e1-baba-2df9305d3ff4

I see that this error in console is also present on eth dev branch: Image

peronczyk commented 9 months ago

The first recent issue is fixed (I hope). Regarding the second one I think someone was working on this in a separate PR. I'll ask. But in short: this is not caused by my PR.

Liubov-crypto commented 9 months ago

You are correct, the ERC-20 Txs and ETH Txs are fetching (in pending status) approx 10 min...

but the list of Txs looks good to me in the web wallet.

In extension I can't see the Tx list from time to time, or could be reproducible the error with seeing only ERC-20 in the Tx list or ETH, as I described above. Idk from what it depends on...

https://github.com/superhero-com/superhero-wallet/assets/69896204/f4a79e96-2df1-4a4b-969c-fe0cb1edba71

https://github.com/superhero-com/superhero-wallet/assets/69896204/a0f7e9c0-8ae9-4615-91ad-2fa76d43ab9e

and when I first entered my wallet in extension the transactions with ERC-20 tokens (Link) were displayed as ETH... but after some time it was refreshed with correct data.

Liubov-crypto commented 9 months ago

We can proceed with this pr.

I created a separate issue about strange behaviour in Tx list in extension: #2703