From 61dda08cb23cc502e3fdbe94d963e37277b14abf Mon Sep 17 00:00:00 2001 From: Zaki Manian Date: Thu, 21 Oct 2021 05:23:02 -0700 Subject: [PATCH] Use a placeholder fee amount during simulation --- orchestrator/cosmos_gravity/src/send.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/orchestrator/cosmos_gravity/src/send.rs b/orchestrator/cosmos_gravity/src/send.rs index 61f98fa27..29326bdc1 100644 --- a/orchestrator/cosmos_gravity/src/send.rs +++ b/orchestrator/cosmos_gravity/src/send.rs @@ -113,8 +113,13 @@ async fn __send_messages( ) -> Result { let cosmos_address = cosmos_key.to_address(&contact.get_prefix()).unwrap(); + let fee_amount = Coin { + denom: gas_price.1.clone(), + amount: 0u32.into(), + }; + let fee = Fee { - amount: Vec::new(), + amount: vec![fee_amount], gas_limit: 0, granter: None, payer: None, @@ -157,12 +162,18 @@ pub async fn send_messages( ) -> Result { let cosmos_address = cosmos_key.to_address(&contact.get_prefix()).unwrap(); + let fee_amount = Coin { + denom: gas_price.1.clone(), + amount: 0u32.into(), + }; + let fee = Fee { - amount: Vec::new(), + amount: vec![fee_amount], gas_limit: 0, granter: None, payer: None, }; + let mut args = contact.get_message_args(cosmos_address, fee).await?; let tx_parts = cosmos_key.build_tx(&messages, args.clone(), MEMO)?;