alpha-wallet-ios icon indicating copy to clipboard operation
alpha-wallet-ios copied to clipboard

Balance update is not synced with transection record update

Open zhangzhongnan928 opened this issue 6 years ago • 9 comments
trafficstars

Sometimes, recent transections get update first. Sometimes, total balance get update first. B69EFFB1-1365-4318-8BF1-4CDBA42B171E D44E34B7-3DCD-4C16-A1FF-EC988343BF4C

This is what happening when balance get update first. Look at these 2 screenshots, if I’m a user, I will get confused. In screen 1, I have 0.8671 ETH. In screen, an additional records shows I received 0.1117, I will expect my balance increase.

Does Android has the same issues? @JamesSmartCell

zhangzhongnan928 avatar Jul 15 '19 14:07 zhangzhongnan928

The Balance, the Recent Transactions and the Transections need to be synced. They need to be updated at the same time.

zhangzhongnan928 avatar Jul 22 '19 04:07 zhangzhongnan928

in most of the cases, Recent Transactions update first. with continuous manually refresh, after 1-2 mins, balance will be updated.

zhangzhongnan928 avatar Aug 03 '20 22:08 zhangzhongnan928

Ok. Will fix

hboon avatar Aug 04 '20 04:08 hboon

Ok. Will fix:

Edit: Spoke too soon. Hard to get this correct without a major change (which we will do). But will see how to at least improve it by refreshing faster in this screen first.

hboon avatar Aug 04 '20 05:08 hboon

  • [ ] A possibly major change so that we either batch calls (probably can't batch since transactions lists are not from the RPC nodes) or otherwise tag data we hold with their block numbers (eg. balance is X at block Y) so we can keep them in sync.
  • [ ] Stop-gap: refresh faster/more selectively when in this screen.

hboon avatar Aug 04 '20 05:08 hboon

https://user-images.githubusercontent.com/33795543/140730823-0d8f72bf-deb1-454a-a1b0-8a20ac1fdfe5.MOV

The issue is still there. The balance and activity is not synced.

zhangzhongnan928 avatar Nov 08 '21 11:11 zhangzhongnan928

Found a separate bug, the fiat value is incorrect in that screen. Fixing it now.

As for the balance being stuck at 0, it works for me. Can you try this:

  1. Wallet tab
  2. Add/Hide Tokens
  3. Paste WETH address: 0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619
  4. Don't tap Done

See if it detects the name and symbol etc. Wonder if it's rate limited by Infura

hboon avatar Nov 12 '21 06:11 hboon

the issue is still there. most of the time, the activity gets updated first. The token balance in the wallet tab gets updated later. Example: https://cn.etherscan.com/tx/0x6e9f54411ce78eb823deb2dc19126d7646ce98f3f748f1b57eb70f6543b02dd5 TX confirmed on 10: 19 am IMG_6973

The balance is still not updated until 10:27 am ( I have been refreshing all the time) It should be 6 IMG_6974

IMG_6972

After keep refreshing, by 10:29, the balance gets updated IMG_6975 Uploading IMG_6976.PNG…

zhangzhongnan928 avatar Apr 29 '22 00:04 zhangzhongnan928

@oa-s would you help take a look to figure out the reason? We can't sync activities and balances at the moment, but it should not be too far off. Maybe this is because we are rate limited by OpenSea

hboon avatar Apr 29 '22 02:04 hboon