-
Notifications
You must be signed in to change notification settings - Fork 107
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
Delivery fee should cover cost of local processing #975
Conversation
Co-authored-by: Vincent Geddes <[email protected]>
Co-authored-by: Vincent Geddes <[email protected]>
Co-authored-by: Vincent Geddes <[email protected]>
Lets limit the scope of this PR, as it does solve a few important problems:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Hey, Vincent. Actually voucher/redeem has been removed in previous commit, but for |
OK, lets keep |
Co-authored-by: Vincent Geddes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last round of minor comments
pub fn calculate_fee<Runtime>( | ||
message: Message, | ||
) -> Result<Fees<<Runtime as Config>::Balance>, SubmitError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, actually, should rename Runtime
to T
. They are the same thing really. And I think its not necessary to cast Runtime into Config.
pub fn calculate_fee<Runtime>( | |
message: Message, | |
) -> Result<Fees<<Runtime as Config>::Balance>, SubmitError> | |
pub fn calculate_fee<T>( | |
message: Message, | |
) -> Result<Fees<T::Balance>, SubmitError> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id: message_id, | ||
origin: message.origin, | ||
message: encoded, | ||
fee, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing the OutboundQueueTicket.fee
field being used anywhere. Can it removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -132,7 +132,7 @@ where | |||
})?; | |||
|
|||
// convert fee to MultiAsset | |||
let fee = MultiAsset::from((MultiLocation::parent(), fee)).into(); | |||
let fee = MultiAsset::from((MultiLocation::parent(), fee.total())).into(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let fee = MultiAsset::from((MultiLocation::parent(), fee.total())).into(); | |
let fee = MultiAsset::from((MultiLocation::parent(), fees.total())).into(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to take base fee(fee in bridgehub) into consideration, more context in #968 (comment)