Skip to content

Commit 357ae25

Browse files
committed
cargo fmt
1 parent a3a1c87 commit 357ae25

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

rust/tw_cosmos_sdk/src/modules/tx_builder.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,10 @@ where
609609
_coin: &dyn CoinContext,
610610
generic: &Proto::mod_Message::WasmInstantiateContract<'_>,
611611
) -> SigningResult<CosmosMessageBox> {
612-
use crate::transaction::message::wasm_message_instantiate_contract::{InstantiateMsg, WasmInstantiateContractMessage};
613-
612+
use crate::transaction::message::wasm_message_instantiate_contract::{
613+
InstantiateMsg, WasmInstantiateContractMessage,
614+
};
615+
614616
let funds = generic
615617
.init_funds
616618
.iter()
@@ -620,7 +622,7 @@ where
620622
let sender = Address::from_str(&generic.sender)
621623
.into_tw()
622624
.context("Invalid sender address")?;
623-
625+
624626
let admin = if generic.admin.is_empty() {
625627
None
626628
} else {
@@ -630,16 +632,20 @@ where
630632
.context("Invalid admin address")?,
631633
)
632634
};
633-
635+
634636
let msg = WasmInstantiateContractMessage {
635637
sender,
636638
admin,
637639
code_id: generic.code_id,
638640
label: generic.label.to_string(),
639-
msg: InstantiateMsg::Json(serde_json::from_slice(&generic.msg).into_tw().context("Invalid JSON in msg")?),
641+
msg: InstantiateMsg::Json(
642+
serde_json::from_slice(&generic.msg)
643+
.into_tw()
644+
.context("Invalid JSON in msg")?,
645+
),
640646
funds,
641647
};
642-
648+
643649
Ok(msg.into_boxed())
644650
}
645651

rust/tw_cosmos_sdk/tests/sign_wasm_contract.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,22 +141,22 @@ fn test_wasm_instantiate_contract() {
141141

142142
let contract = Proto::mod_Message::WasmInstantiateContract {
143143
sender: "thor1z53wwe7md6cewz9sqwqzn0aavpaun0gw0exn2r".into(),
144-
admin: "thor1z53wwe7md6cewz9sqwqzn0aavpaun0gw0exn2r".into(),
144+
admin: "thor1z53wwe7md6cewz9sqwqzn0aavpaun0gw0exn2r".into(),
145145
code_id: 1,
146-
label: "Contract".into(),
146+
label: "Contract".into(),
147147
msg: Cow::Borrowed(execute_msg.as_bytes()),
148148
init_funds: vec![],
149149
..Default::default()
150150
};
151151

152152
let input = Proto::SigningInput {
153153
account_number: 593,
154-
chain_id: "thorchain-1".into(),
155-
sequence: 24,
156-
fee: Some(make_fee_none(200_000)),
157-
private_key: account_593_private_key(),
158-
mode: Proto::BroadcastMode::SYNC,
159-
messages: vec![make_message(
154+
chain_id: "thorchain-1".into(),
155+
sequence: 24,
156+
fee: Some(make_fee_none(200_000)),
157+
private_key: account_593_private_key(),
158+
mode: Proto::BroadcastMode::SYNC,
159+
messages: vec![make_message(
160160
MessageEnum::wasm_instantiate_contract_message(contract),
161161
)],
162162
..Default::default()

0 commit comments

Comments
 (0)