Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
endulab opened this issue Nov 21, 2023 · 1 comment · Fixed by #4953 or status-im/status-desktop#14413

Comments

@endulab
Copy link
Contributor

endulab commented Nov 21, 2023

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 endulab self-assigned this Nov 21, 2023
@endulab endulab changed the title Move transaction listening to status-go [Community tokens] Move transaction listening to status-go - improvement Nov 21, 2023
@jrainville jrainville transferred this issue from status-im/status-desktop Nov 21, 2023
@endulab
Copy link
Contributor Author

endulab commented Nov 27, 2023

FYI @cammellos
If you want to introduce minting in mobile, maybe you should do this in a new way.

@endulab endulab self-assigned this Mar 13, 2024
@jrainville jrainville added this to the 2.28.0 Beta milestone Mar 13, 2024
@jrainville jrainville modified the milestones: 2.28.0 Beta, 2.29.0 Beta Mar 26, 2024
endulab added a commit that referenced this issue Apr 11, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue Apr 11, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
@endulab endulab linked a pull request Apr 12, 2024 that will close this issue
@endulab endulab linked a pull request Apr 12, 2024 that will close this issue
endulab added a commit that referenced this issue Apr 15, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue Apr 18, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue Apr 18, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue Apr 18, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue Apr 18, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue Apr 25, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue May 6, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue May 13, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
endulab added a commit that referenced this issue May 16, 2024
Use EventWatcher to catch wallet events.
Handling all community tokens wallet events in communitytokens service (database and messenger operations).
Adding new signal to nim: CommunityTokenTransactionSignal, which is emitted everytime when the event is received.

Issue #4351
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment