oasis-wallet-web icon indicating copy to clipboard operation
oasis-wallet-web copied to clipboard

Fix updating transactions list

Open lukaw3d opened this issue 1 month ago • 3 comments

Current behavior:

  • make a new transaction and request balance and transactions from oasisscan
  • request balance from oasisscan every 30 seconds
  • if balance changes, request transactions from oasisscan
  • request balance from oasisscan every 30 seconds
  • if balance changes, request transactions from oasisscan
  • request balance from oasisscan every 30 seconds
  • if balance changes, request transactions from oasisscan ...

Issue: Immediately after making a transaction oasisscan responds with old balance and old transactions. After 30 seconds oasisscan responds with changed balance, and then with old transactions. After 30 seconds balance is not changed, so we do not try to get new transactions. Wallet is stuck showing old transactions, missing the new transaction.

Solutions:

  • maybe just add 15 second delay to fetching transactions after balance changes (delay might be different on testnet)
  • fetch transactions every time. Adds overhead to oasisscan backend
  • ignore balance change until transactions change

lukaw3d avatar May 20 '24 17:05 lukaw3d