Skip to content

Commit

Permalink
WIP: create unsigned tx payload
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Apr 2, 2024
1 parent 0e3fafb commit 2be1bfd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion mm2src/coins/tendermint/tendermint_coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,19 @@ impl TendermintCoin {
Ok((tx_id, tx_raw))
},
TendermintActivationPolicy::PublicKey(_) => {
// TODO: Figure out a communication bridge we can use for sending unsigned TX and
let account_info = try_tx_s!(self.account_info(&self.account_id).await);
let sign_doc = try_tx_s!(self.any_to_sign_doc(account_info, tx_payload, fee, timeout_height, memo));

let _unsigned_tx = json!({
"sign_doc": {
"body_bytes": sign_doc.body_bytes,
"auth_info_bytes": sign_doc.auth_info_bytes,
"chain_id": sign_doc.chain_id,
"account_number": sign_doc.account_number,
}
});

// TODO: Figure out a req-res communication bridge we can use for sending unsigned TX and
// receiving it's broadcasted hash.
todo!()
},
Expand Down

0 comments on commit 2be1bfd

Please sign in to comment.