This change defers to the default hook to enforce its fees and perform refunds (if necessary). Hooks can do this by using the hyperlane message.sender (info.sender from the mailbox.dispatch call). This is more consistent with the EVM implementation. We must however, check the required fees in the mailbox because, unlike the EVM, the post dispatch calls come after the dispatch returns and we need to pass the difference to the default hook call.
This change defers to the default hook to enforce its fees and perform refunds (if necessary). Hooks can do this by using the hyperlane
message.sender
(info.sender
from themailbox.dispatch
call). This is more consistent with the EVM implementation. We must however, check the required fees in the mailbox because, unlike the EVM, the post dispatch calls come after the dispatch returns and we need to pass the difference to the default hook call.Fixes https://github.com/hyperlane-xyz/issues/issues/933