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

[Community tokens] Move transaction listening to status-go - improvement

Open endulab opened this issue 1 year ago • 1 comments

The purpose of this task is to move transaction listening logic from client code to status-go.

Background

All operations in community tokens service consist of 2 steps:

  1. contract interaction, and then
  2. logic operation (eg. adding a token to a database, promoting to control node).

The complexity of the flow is high because it is divided into status-go and client code. There are many calls to status-go from a client This is not good also for a mobile team if they want to add a token minting functionality, because they will have to implement a lot of logic.

The reason of this situation is the legacy transaction system which required client interaction. Now, it has changed, and we can listen to transactions on status-go side.

Solution

A new schema will look like this:

  • Client asks status-go to do operation
  • Status-go does blockchain operation and listens to transaction
  • When transaction is finished status-go does some logic, eg. database update. It should also add AC notification if needed
  • The signal is send to client only to show toast messages or update model.

endulab avatar Nov 21 '23 11:11 endulab