feat: Add afterAdd hook to transaction controller#5692
Conversation
|
Hey @matthewwalsh0 : I have a query about these hooks approach, but this can result in code written in clients and also replicated across extension / mobile. |
From the perspective of the controllers, they're just injection points for custom logic so we can decouple from other domains and client specific decisions such as smart transactions, delegations, and snaps. But if the same hook is needed in both clients, there is nothing stopping the hook being defined within another controller or central package, and the hook just invoking that via the messenger, as we should indeed avoid duplication where possible. |
1a62576 to
f3b265a
Compare
Explanation
Add optional
afterAddhook to mutate transactions added viaaddTransactionmethod.Persist original transaction params in new
txParamsOriginalproperty.References
Fixes #4688
Checklist