diff --git a/grpc-client/src/cli.rs b/grpc-client/src/cli.rs index 307c58f..7ed0bb6 100644 --- a/grpc-client/src/cli.rs +++ b/grpc-client/src/cli.rs @@ -136,10 +136,10 @@ impl GrpcClient { pub async fn broadcast_tx_sync( &mut self, - sign_key: SigningKey, - addr: String, + sign_key: &SigningKey, + addr: &String, msg: T, - coin: Coin, + coin: &Coin, memo: String, timeout_height: u64, gas: u64, @@ -153,7 +153,9 @@ impl GrpcClient { .clients .cosmos .auth - .account(QueryAccountRequest { address: addr }) + .account(QueryAccountRequest { + address: addr.to_owned(), + }) .await? .into_inner(); let base_acct: BaseAccount = @@ -182,7 +184,7 @@ impl GrpcClient { let auth_info = AuthInfo { signer_infos: vec![signer_info], fee: Some(Fee { - amount: vec![coin], + amount: vec![coin.clone()], gas_limit: gas, payer: Default::default(), granter: Default::default(), diff --git a/grpc-client/src/tests.rs b/grpc-client/src/tests.rs index 6bcc0e5..98d071b 100644 --- a/grpc-client/src/tests.rs +++ b/grpc-client/src/tests.rs @@ -67,10 +67,10 @@ async fn test_submit_tx() { let resp = client .broadcast_tx_sync( - sender_private_key, - sender_account_id.to_string(), + &sender_private_key, + &sender_account_id.to_string(), msg_send, - coin, + &coin, memo, timeout_height, gas,