From 6b3b6516e7be4d247f132cb21c62bba36339c9e4 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia <oxarbitrage@gmail.com> Date: Mon, 13 Sep 2021 12:50:30 -0300 Subject: [PATCH] calculate fee using full message payload (#1132) --- bridges/bin/runtime-common/src/messages.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/bin/runtime-common/src/messages.rs b/bridges/bin/runtime-common/src/messages.rs index a7591b2e57e..f85cc47ecef 100644 --- a/bridges/bin/runtime-common/src/messages.rs +++ b/bridges/bin/runtime-common/src/messages.rs @@ -74,9 +74,9 @@ pub trait ChainWithMessages { /// Accound id on the chain. type AccountId: Encode + Decode; /// Public key of the chain account that may be used to verify signatures. - type Signer: Decode; + type Signer: Encode + Decode; /// Signature type used on the chain. - type Signature: Decode; + type Signature: Encode + Decode; /// Type of weight that is used on the chain. This would almost always be a regular /// `frame_support::weight::Weight`. But since the meaning of weight on different chains /// may be different, the `WeightOf<>` construct is used to avoid confusion between @@ -341,7 +341,7 @@ pub mod source { // of the message dispatch in the delivery transaction cost let pay_dispatch_fee_at_target_chain = payload.dispatch_fee_payment == DispatchFeePayment::AtTargetChain; let delivery_transaction = BridgedChain::<B>::estimate_delivery_transaction( - &payload.call, + &payload.encode(), pay_dispatch_fee_at_target_chain, if pay_dispatch_fee_at_target_chain { 0.into() -- GitLab