Move ChainWithBalances::NativeBalance -> Chain::Balance (#990)

* move ChainWithBalances::NativeBalance -> Chain::Balance

* dummy commit

* Revert "dummy commit"

This reverts commit c00642153d260685a91d4fffbc424d225741fceb.
This commit is contained in:
Svyatoslav Nikolsky
2021-06-09 16:16:57 +03:00
committed by Bastian Köcher
parent b4939e2c9f
commit 4a47452c20
12 changed files with 27 additions and 28 deletions
@@ -18,7 +18,7 @@ use crate::cli::bridge::FullBridge;
use crate::cli::{Balance, CliChain, HexBytes, HexLaneId, SourceConnectionParams};
use crate::select_full_bridge;
use codec::{Decode, Encode};
use relay_substrate_client::{Chain, ChainWithBalances};
use relay_substrate_client::Chain;
use structopt::StructOpt;
/// Estimate Delivery & Dispatch Fee command.
@@ -52,7 +52,7 @@ impl EstimateFee {
let lane = lane.into();
let payload = Source::encode_message(payload).map_err(|e| anyhow::format_err!("{:?}", e))?;
let fee: <Source as ChainWithBalances>::NativeBalance =
let fee: <Source as Chain>::Balance =
estimate_message_delivery_and_dispatch_fee(&source_client, ESTIMATE_MESSAGE_FEE_METHOD, lane, payload)
.await?;
@@ -130,11 +130,12 @@ impl SendMessage {
let fee = match self.fee {
Some(fee) => fee,
None => Balance(
estimate_message_delivery_and_dispatch_fee::<
<Source as relay_substrate_client::ChainWithBalances>::NativeBalance,
_,
_,
>(&source_client, ESTIMATE_MESSAGE_FEE_METHOD, lane, payload.clone())
estimate_message_delivery_and_dispatch_fee::<<Source as Chain>::Balance, _, _>(
&source_client,
ESTIMATE_MESSAGE_FEE_METHOD,
lane,
payload.clone(),
)
.await? as _,
),
};