Accountsdb plugin transaction part 3: Transaction Notifier (#21374)
The TransactionNotifierInterface interface for notifying transactions. Changes to transaction_status_service to notify the notifier of the transaction data. Interface to query the plugin's interest in transaction data
This commit is contained in:
@@ -54,9 +54,19 @@ impl AccountsDbPluginManager {
|
||||
}
|
||||
|
||||
/// Check if there is any plugin interested in account data
|
||||
pub fn to_notify_account_data(&self) -> bool {
|
||||
pub fn account_data_notifications_enabled(&self) -> bool {
|
||||
for plugin in &self.plugins {
|
||||
if plugin.to_notify_account_data() {
|
||||
if plugin.account_data_notifications_enabled() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
/// Check if there is any plugin interested in transaction data
|
||||
pub fn transaction_notifications_enabled(&self) -> bool {
|
||||
for plugin in &self.plugins {
|
||||
if plugin.transaction_notifications_enabled() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user