Skip to content

Commit

Permalink
Revert "Merge 'origin/fraccaman/fix-sdk-tx-with-hash' (#1474)"
Browse files Browse the repository at this point in the history
This reverts commit 11a6d92, reversing
changes made to 899bb44.
  • Loading branch information
juped authored and Fraccaman committed Jul 5, 2023
1 parent 69f0715 commit a7be5d9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions shared/src/ledger/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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::<C, U>(
Expand Down Expand Up @@ -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::<C, U>(
Expand Down Expand Up @@ -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::<C, U>(
Expand Down Expand Up @@ -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::<C, U>(
Expand Down Expand Up @@ -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::<C, U>(
client,
Expand Down Expand Up @@ -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::<C, U>(
Expand Down

0 comments on commit a7be5d9

Please sign in to comment.