0.7.28
This commit is contained in:
@@ -155,8 +155,8 @@ impl SolanaWsDetectionService {
|
||||
Some(token_program) => token_program,
|
||||
None => return Ok(None),
|
||||
};
|
||||
if token_program != crate::SPL_TOKEN_PROGRAM_ID.to_string()
|
||||
&& token_program != crate::SPL_TOKEN_2022_PROGRAM_ID.to_string()
|
||||
if token_program.as_str() != crate::SPL_TOKEN_PROGRAM_ID
|
||||
&& token_program.as_str() != crate::SPL_TOKEN_2022_PROGRAM_ID
|
||||
{
|
||||
return Ok(None);
|
||||
}
|
||||
@@ -181,7 +181,7 @@ impl SolanaWsDetectionService {
|
||||
let slot =
|
||||
extract_slot_from_result(notification.method.as_str(), ¬ification.params.result);
|
||||
let payload = build_notification_payload(notification);
|
||||
let is_quote_token = mint == crate::WSOL_MINT_ID.to_string();
|
||||
let is_quote_token = mint.as_str() == crate::WSOL_MINT_ID;
|
||||
let input = crate::DetectionTokenCandidateInput::new(
|
||||
mint,
|
||||
None,
|
||||
@@ -230,8 +230,8 @@ impl SolanaWsDetectionService {
|
||||
Some(owner) => owner,
|
||||
None => return Ok(None),
|
||||
};
|
||||
if owner == crate::SPL_TOKEN_PROGRAM_ID.to_string()
|
||||
|| owner == crate::SPL_TOKEN_2022_PROGRAM_ID.to_string()
|
||||
if owner.as_str() == crate::SPL_TOKEN_PROGRAM_ID
|
||||
|| owner.as_str() == crate::SPL_TOKEN_2022_PROGRAM_ID
|
||||
{
|
||||
return Ok(None);
|
||||
}
|
||||
@@ -603,10 +603,10 @@ fn build_signal_kind_for_notification(
|
||||
}
|
||||
let owner_option = extract_account_owner(account_value);
|
||||
if let Some(owner) = owner_option {
|
||||
if owner == crate::SPL_TOKEN_PROGRAM_ID.to_string() {
|
||||
if owner.as_str() == crate::SPL_TOKEN_PROGRAM_ID {
|
||||
return "signal.account_notification.spl_token".to_string();
|
||||
}
|
||||
if owner == crate::SPL_TOKEN_2022_PROGRAM_ID.to_string() {
|
||||
if owner.as_str() == crate::SPL_TOKEN_2022_PROGRAM_ID {
|
||||
return "signal.account_notification.spl_token_2022".to_string();
|
||||
}
|
||||
}
|
||||
@@ -650,10 +650,10 @@ fn build_signal_kind_for_notification(
|
||||
Some(owner) => owner,
|
||||
None => return "signal.program_notification.generic".to_string(),
|
||||
};
|
||||
if owner == crate::SPL_TOKEN_PROGRAM_ID.to_string() {
|
||||
if owner.as_str() == crate::SPL_TOKEN_PROGRAM_ID {
|
||||
return "signal.program_notification.spl_token".to_string();
|
||||
}
|
||||
if owner == crate::SPL_TOKEN_2022_PROGRAM_ID.to_string() {
|
||||
if owner.as_str() == crate::SPL_TOKEN_2022_PROGRAM_ID {
|
||||
return "signal.program_notification.spl_token_2022".to_string();
|
||||
}
|
||||
return "signal.program_notification.generic".to_string();
|
||||
|
||||
Reference in New Issue
Block a user