current position:Home>Mobile Wallet

Mobile Wallet

2022-02-03 20:58:48 Q & A of Denglian community

problem :

How does the mobile wallet server manage the balance ? Is to save the database , Regularly update ; Still don't save to the database , When mobile wallet requests , Then go to the chain to check ?

Take the answer 1:

The client must cache the account balance ,

But we need to update the balance at the right time :

  1. When looking for the balance
  2. After startup, the background updates by default
  3. Transactions sent by subscription account during use
  4. subscribe Token Transfer event

If the background service of the wallet is centralized , You can automatically push the transaction information notification message related to the account , To update the balance .

It should also be noted that the account assets , Include Token Of , and Token It can be added by other users . here , such Token Real time updates are not easy to handle .

If there is a solution to your problem , Please choose in time as the answer , So that more people can know .

Other answers 1:

Other answers 2:

Other answers 3:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.

Random recommended