From efdae5ae9293bdfe3d6fb0915bc96837273c3e15 Mon Sep 17 00:00:00 2001 From: chiumax Date: Wed, 2 Oct 2024 10:18:27 -0700 Subject: [PATCH] patch indexer breaking --- .../user_transactions_models/signatures.rs | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/rust/processor/src/db/common/models/user_transactions_models/signatures.rs b/rust/processor/src/db/common/models/user_transactions_models/signatures.rs index 0ff2ea1c1..793f6b1d6 100644 --- a/rust/processor/src/db/common/models/user_transactions_models/signatures.rs +++ b/rust/processor/src/db/common/models/user_transactions_models/signatures.rs @@ -99,19 +99,33 @@ impl Signature { SignatureEnum::FeePayer(_) => String::from("fee_payer_signature"), SignatureEnum::SingleSender(sender) => { let account_signature = sender.sender.as_ref().unwrap(); - let signature = account_signature.signature.as_ref().unwrap(); + let signature = account_signature.signature.as_ref(); match signature { - AccountSignatureEnum::Ed25519(_) => String::from("ed25519_signature"), - AccountSignatureEnum::MultiEd25519(_) => { + Some(AccountSignatureEnum::Ed25519(_)) => String::from("ed25519_signature"), + Some(AccountSignatureEnum::MultiEd25519(_)) => { String::from("multi_ed25519_signature") }, - AccountSignatureEnum::SingleKeySignature(_) => { + Some(AccountSignatureEnum::SingleKeySignature(_)) => { String::from("single_key_signature") }, - AccountSignatureEnum::MultiKeySignature(_) => { + Some(AccountSignatureEnum::MultiKeySignature(_)) => { String::from("multi_key_signature") }, - } + None => String::from("unknown_signature") + } + // let signature = account_signature.signature.as_ref().unwrap(); + // match signature { + // AccountSignatureEnum::Ed25519(_) => String::from("ed25519_signature"), + // AccountSignatureEnum::MultiEd25519(_) => { + // String::from("multi_ed25519_signature") + // }, + // AccountSignatureEnum::SingleKeySignature(_) => { + // String::from("single_key_signature") + // }, + // AccountSignatureEnum::MultiKeySignature(_) => { + // String::from("multi_key_signature") + // }, + // } }, } }