Closed ValentinTrinque closed 10 months ago
Today, we emit a generic new_interaction event with the specific interaction event as a value.
new_interaction
After a discussion with @notbot00, we came to the conclusion having specific events is much easier for the frontend.
On the backend
- wailsRuntime.EmitEvent(ctx, "new_interaction", interaction) + wailsRuntime.EmitEvent(ctx, interaction.Name, interaction)
On the frontend
- runtime.OnEvent("new_interaction", func() { - // handling generic event - }) + runtime.OnEvent("request_wallet_connection", func() {}) + runtime.OnEvent("request_transaction_review_for_sending", func() {}) + // Etc...
Today, we emit a generic
new_interaction
event with the specific interaction event as a value.After a discussion with @notbot00, we came to the conclusion having specific events is much easier for the frontend.
Technical implications
On the backend
On the frontend
Events to listen to