Skip to content

Commit

Permalink
feat: Add support for TransactionHash sign type
Browse files Browse the repository at this point in the history
  • Loading branch information
Charon-Fan committed May 31, 2024
1 parent 73bd016 commit 986adef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/ur-registry/src/stellar/stellar_sign_request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ const SIGN_TYPE: u8 = 6;
pub enum SignType {
#[default]
Transaction = 1,
TransactionHash,
Message,
}

impl SignType {
pub fn from_u32(i: u32) -> Result<Self, String> {
match i {
1 => Ok(SignType::Transaction),
2 => Ok(SignType::Message),
2 => Ok(SignType::TransactionHash),
3 => Ok(SignType::Message),
x => Err(format!(
"invalid value for sign_type in stellar-sign-request, expected 1 or 2, received {:?}",
x
Expand Down

0 comments on commit 986adef

Please sign in to comment.