This PR adds TrackBeforeSend hook and BlockBeforeSend hook, and deprecates BeforeSend hook.
Each hook, respectively would call the hook that has been registered from a different module.
The difference between the two new hooks being introduced is that TrackBeforesend hook does not have the ability to cause any effect, as it does not emit errors. Meanwhile, BlockBeforeSend does emit errors, allowing connected hooks to stop and block the send.
Additional method SendCoinsWithoutBlockHook has also been added along with the two hooks, as for module <> module transfers, we want to ensure it does not get blocked by external hooks.
What is the purpose of the change
This PR adds
TrackBeforeSend
hook andBlockBeforeSend
hook, and deprecatesBeforeSend
hook. Each hook, respectively would call the hook that has been registered from a different module. The difference between the two new hooks being introduced is thatTrackBeforesend
hook does not have the ability to cause any effect, as it does not emit errors. Meanwhile,BlockBeforeSend
does emit errors, allowing connected hooks to stop and block the send.Additional method
SendCoinsWithoutBlockHook
has also been added along with the two hooks, as for module <> module transfers, we want to ensure it does not get blocked by external hooks.Brief Changelog
Add
TrackBeforeSend
,BlockBeforeSend
hooks. DeprecateBeforeSend
hookTesting and Verifying
This change adds tests
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? (yes / no)x/<module>/spec/
) / Osmosis docs repo / not documented)