From a7be5d95370b5c6ce2df621f6eb77267caf98d11 Mon Sep 17 00:00:00 2001 From: "Raymond E. Pasco" Date: Tue, 30 May 2023 13:22:20 -0400 Subject: [PATCH] Revert "Merge 'origin/fraccaman/fix-sdk-tx-with-hash' (#1474)" This reverts commit 11a6d92e2295bc64372275e1813d19e958b5e983, reversing changes made to 899bb4412050873b6ebe2a55c37b8ec4dc33b8c6. --- shared/src/ledger/tx.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/shared/src/ledger/tx.rs b/shared/src/ledger/tx.rs index 27245ecaed5..5b3e3bc231a 100644 --- a/shared/src/ledger/tx.rs +++ b/shared/src/ledger/tx.rs @@ -352,7 +352,7 @@ pub async fn submit_reveal_pk_aux< tx.header.chain_id = args.chain_id.clone().expect("value should be there"); tx.header.expiration = args.expiration; tx.set_data(Data::new(tx_data)); - tx.set_code(Code::from_hash(tx_code_hash)); + tx.set_code(Code::new(tx_code)); // submit_tx without signing the inner tx let keypair = if let Some(signing_key) = &args.signing_key { @@ -671,7 +671,7 @@ pub async fn submit_validator_commission_change< tx.header.chain_id = args.tx.chain_id.clone().unwrap(); tx.header.expiration = args.tx.expiration; tx.set_data(Data::new(data)); - tx.set_code(Code::from_hash(tx_code_hash)); + tx.set_code(Code::new(tx_code)); let default_signer = args.validator.clone(); process_tx::( @@ -789,7 +789,7 @@ pub async fn submit_withdraw< tx.header.chain_id = args.tx.chain_id.clone().unwrap(); tx.header.expiration = args.tx.expiration; tx.set_data(Data::new(data)); - tx.set_code(Code::from_hash(tx_code_hash)); + tx.set_code(Code::new(tx_code)); let default_signer = args.source.unwrap_or(args.validator); process_tx::( @@ -875,7 +875,7 @@ pub async fn submit_unbond< tx.header.chain_id = args.tx.chain_id.clone().unwrap(); tx.header.expiration = args.tx.expiration; tx.set_data(Data::new(data)); - tx.set_code(Code::from_hash(tx_code_hash)); + tx.set_code(Code::new(tx_code)); let default_signer = args.source.unwrap_or_else(|| args.validator.clone()); process_tx::( @@ -995,7 +995,7 @@ pub async fn submit_bond< tx.header.chain_id = args.tx.chain_id.clone().unwrap(); tx.header.expiration = args.tx.expiration; tx.set_data(Data::new(data)); - tx.set_code(Code::from_hash(tx_code_hash)); + tx.set_code(Code::new(tx_code)); let default_signer = args.source.unwrap_or(args.validator); process_tx::( @@ -1138,7 +1138,7 @@ pub async fn submit_ibc_transfer< tx.header.chain_id = args.tx.chain_id.clone().unwrap(); tx.header.expiration = args.tx.expiration; tx.set_data(Data::new(data)); - tx.set_code(Code::from_hash(tx_code_hash)); + tx.set_code(Code::new(tx_code)); process_tx::( client, @@ -1488,7 +1488,7 @@ pub async fn submit_init_account< }; let data = data.try_to_vec().map_err(Error::EncodeTxFailure)?; tx.set_data(Data::new(data)); - tx.set_code(Code::from_hash(tx_code_hash)); + tx.set_code(Code::new(args.tx_code_path)); // TODO Move unwrap to an either let initialized_accounts = process_tx::(