Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f committed Oct 9, 2024
1 parent fb29823 commit 3104eb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rust/chains/tw_pactus/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub struct Address {

impl Address {
pub fn from_public_key(public_key: &PublicKey) -> Result<Self, AddressError> {
let pud_data = public_key.to_h256();
let pud_data = public_key.to_bytes();
let pub_hash_data =
ripemd_160(&blake2_b(pud_data.as_ref(), 32).map_err(|_| AddressError::Internal)?);
let pub_hash = Address::vec_to_pub_hash(pub_hash_data)?;
Expand Down
8 changes: 4 additions & 4 deletions rust/chains/tw_pactus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ impl Transaction {
receiver,
amount: Amount(pld.amount),
})
}
},
Pactus::Proto::mod_TransactionMessage::OneOfpayload::bond(_pld) => {
return SigningError::err(SigningErrorType::Error_not_supported)
}
},
Pactus::Proto::mod_TransactionMessage::OneOfpayload::None => {
return SigningError::err(SigningErrorType::Error_invalid_params)
}
},
};

let flags = FLAG_NOT_SIGNED;
Expand All @@ -175,7 +175,7 @@ impl Transaction {
trx.memo.to_string(),
payload,
))
}
},
}
}

Expand Down

0 comments on commit 3104eb9

Please sign in to comment.