Skip to content

Commit

Permalink
feat(registry-type): [PRAD-2790] support crypto-multi-accounts ur type
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaomengru2015 committed Jul 6, 2023
1 parent 9e5cad9 commit 07b6b6d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/ur-registry/src/registry_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use alloc::string::{String, ToString};
#[derive(Clone, Debug)]
pub enum URType {
CryptoPsbt(String),
CryptoMultiAccounts(String),
CryptoAccount(String),
EthSignRequest(String),
SolSignRequest(String),
Expand All @@ -19,6 +20,7 @@ impl URType {
pub fn from(type_str: &str) -> URResult<URType> {
match type_str {
"crypto-psbt" => Ok(URType::CryptoPsbt(type_str.to_string())),
"crypto-multi-accounts" => Ok(URType::CryptoMultiAccounts(type_str.to_string())),
"crypto-account" => Ok(URType::CryptoAccount(type_str.to_string())),
"bytes" => Ok(URType::Bytes(type_str.to_string())),
"eth-sign-request" => Ok(URType::EthSignRequest(type_str.to_string())),
Expand All @@ -35,6 +37,7 @@ impl URType {
pub fn get_type_str(&self) -> String {
match self {
URType::CryptoPsbt(type_str) => type_str.to_string(),
URType::CryptoMultiAccounts(type_str) => type_str.to_string(),
URType::CryptoAccount(type_str) => type_str.to_string(),
URType::Bytes(type_str) => type_str.to_string(),
URType::EthSignRequest(type_str) => type_str.to_string(),
Expand Down

0 comments on commit 07b6b6d

Please sign in to comment.