Skip to content

Commit

Permalink
only match the tx content
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Apr 29, 2024
1 parent 99707f2 commit 7d87d32
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions mm2src/coins/tendermint/tendermint_coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ use cosmrs::proto::cosmos::bank::v1beta1::{MsgSend as MsgSendProto, QueryBalance
use cosmrs::proto::cosmos::base::tendermint::v1beta1::{GetBlockByHeightRequest, GetBlockByHeightResponse,
GetLatestBlockRequest, GetLatestBlockResponse};
use cosmrs::proto::cosmos::base::v1beta1::Coin as CoinProto;
use cosmrs::proto::cosmos::tx::v1beta1::{GetTxRequest, GetTxResponse, GetTxsEventRequest, GetTxsEventResponse,
SimulateRequest, SimulateResponse, Tx, TxBody, TxRaw};
use cosmrs::proto::cosmos::tx::v1beta1::{AuthInfo, GetTxRequest, GetTxResponse, GetTxsEventRequest,
GetTxsEventResponse, SimulateRequest, SimulateResponse, Tx, TxBody, TxRaw};
use cosmrs::proto::prost::{DecodeError, Message};
use cosmrs::tendermint::block::Height;
use cosmrs::tendermint::chain::Id as ChainId;
Expand Down Expand Up @@ -1071,13 +1071,7 @@ impl TendermintCoin {

if sign_doc.body_bytes != tx_raw_inner.body_bytes {
return Err(crate::TransactionErr::Plain(ERRL!(
"Unsigned transaction content don't match with the externally provided transaction."
)));
}

if sign_doc.auth_info_bytes != tx_raw_inner.auth_info_bytes {
return Err(crate::TransactionErr::Plain(ERRL!(
"Provided transaction signer don't match with the unsigned transaction owner."
"Unsigned transaction don't match with the externally provided transaction."
)));
}

Expand Down

0 comments on commit 7d87d32

Please sign in to comment.