status-mobile icon indicating copy to clipboard operation
status-mobile copied to clipboard

Wallet: Send Flows - Balance is not updated for token receiver until relogin

Open J-Son89 opened this issue 2 years ago • 1 comments

In the wallet flows, if a user sends a token from and to their own accounts the receiving account is not updating.

For example user has account A with 1 ETH and account B with 0 ETH.

user sends everything from account A to Account B

Expected Result: User sees Account A with 0 Eth and Account B with 1Eth

Actual Result User sees Account A with 0 Eth and Account B with 0Eth until relogin.

J-Son89 avatar Jan 05 '24 15:01 J-Son89

The balance also is not updated for Sender until relogin

VolodLytvynenko avatar Feb 16 '24 16:02 VolodLytvynenko

status-go doesn't have any sort of socket connection with our providers to get notified instantly for such events, it polls and detects new activity periodically.

If an ETH/ERC20 transfer* is detected, it uses the wallet-tick-reload event to signal the client. Mobile is already handling the signal (commit ID: https://github.com/status-im/status-mobile/commit/4fe62553ca6c6792ef565d83cf2cf901ad27f98e) to refresh the tokens/balances.

*It could take up to 10 minutes for a transfer to be detected. If the transfer is generated from within Status, its detection is much faster, so the user shouldn't have to wait long.

We can't provide an instant balance update at this moment. The desktop has plans to add a manual refresh button. Mobile has the same in the Design pipeline.

smohamedjavid avatar Feb 23 '24 18:02 smohamedjavid

@status-im/mobile-qa - If it's not too much trouble, please check the above comment and let me know your thoughts. If we are all in agreement, we can close this issue.

smohamedjavid avatar Feb 27 '24 12:02 smohamedjavid

status-go doesn't have any sort of socket connection with our providers to get notified instantly for such events, it polls and detects new activity periodically.

If an ETH/ERC20 transfer* is detected, it uses the wallet-tick-reload event to signal the client. Mobile is already handling the signal (commit ID: 4fe6255) to refresh the tokens/balances.

*It could take up to 10 minutes for a transfer to be detected. If the transfer is generated from within Status, its detection is much faster, so the user shouldn't have to wait long.

We can't provide an instant balance update at this moment. The desktop has plans to add a manual refresh button. Mobile has the same in the Design pipeline.

@smohamedjavid thank you for the explanation. Just to clarify: do I understand correctly that we are unable to instantly update balance even for sender after sending the transaction?

On the video below you can see the following

  1. User A has ETH balance 0.04771
  2. User A sends 0.001 ETH to User B

Actual result: ETH balance for User A remains 0.04771 after sending transaction. It is updated to 0.0467 only after relogin.

https://github.com/status-im/status-mobile/assets/97245802/26f814be-3779-4bd3-a34a-375b77f4fac2

pavloburykh avatar Feb 27 '24 12:02 pavloburykh

Just to clarify: do I understand correctly that we are unable to instantly update balance even for sender after sending the transaction?

Yes, @pavloburykh.

smohamedjavid avatar Feb 27 '24 13:02 smohamedjavid

We will eventually add pull to refresh which the receiver could keep using

J-Son89 avatar Feb 27 '24 13:02 J-Son89

Yes, @pavloburykh.

got it. Okay, if we technically cannot do anything about this problem then we can close the issue.

pavloburykh avatar Feb 27 '24 13:02 pavloburykh