Skip to content

Commit

Permalink
Use a placeholder fee amount during simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
zmanian committed Oct 21, 2021
1 parent 7e2ad76 commit 61dda08
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions orchestrator/cosmos_gravity/src/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,13 @@ async fn __send_messages(
) -> Result<TxResponse, CosmosGrpcError> {
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,
Expand Down Expand Up @@ -157,12 +162,18 @@ pub async fn send_messages(
) -> Result<TxResponse, CosmosGrpcError> {
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)?;
Expand Down

0 comments on commit 61dda08

Please sign in to comment.