How to display transaction status efficiently?

Yes I have done so just for the example I have shown… But while defining in the cloud function I did the way you mentioned… you could have seen in that output.

try to enable an eth chain first, then try to use watchEthAddress, also try to enable bsc chain if you try watchbscaddress, for matic you can try watchPolygonAddress

Oh man. I have been tryin with watchMaticAddress instead of watchPolygonAddress. Please update the same in the docs also. :slight_smile:

So for each new user I need to run the code (add to the watchlist) so that I could monitor their transactions right ?

if the user authenticates with metamask, you don’t need to run that code, unless you also want full history of the user transactions

So you mean that if an user authenticate with metamask then Moralis itself shows the transaction data without explicit invocation of cloud function ? But in my case its not showing the transactions ? Should I enable anything ?

you should not enable anything, it should work automatically, in your server settings you can select for each evm/chain how many transactions to sync historically on every chain for an address

So you’re that the transactions gets updated in the DB in the name of PolygonTransactions, EthTransactions etc class. or you’re telling about the _AddressSyncStatus ?

first option with EthTransactions as example

So according to my understanding the scenario is as follows.

  1. I create a server be it Mainnet or testnet.
  2. In that EVM configurations I select the chains and set max transactions sync.
  3. Develop dapp
  4. Authenticate users with Metamask and transfer assets (tokens) via app.
  5. Now the transactions gets updated on the DB and I can query them for displaying later.

Right ??

If so what if am disconnected my wallet and if someone sends me a token will it be updated on my next login session with my wallet ?

(Pardon me as this is getting longer :slight_smile:. Within 2-3 weeks I need to submit my project and that’s why )

you are right on the first part

on the second parti with disconnecting the wallet, it doesn’t matter if it is disconnected, it was already added on the server and the server will sync the transactions for that address and next time the user authenticates will already have all the transactions synced in the server database

1 Like

Hi I tried but only Polygon mumbai worked for me and Rinkeby test network transactions didn’t synced even though I added them in the EVM configuration section!!!

And after switching wallet it (polygon mumbai) also stopped working.

Also the timestamp is showing wrong date n time.

how is that it shows wrong date and time, you have the timestamp for the block that shouldn’t be wrong, it is in UTC

1 Like

UTC oh okay got it. I have to convert into the required time zone later :+1:t2:. Hey I have reconfigured the server and now the sync is working fine. Thanks dude

1 Like