From 73aefbcdb835634d56ddb3843ee4d3e85f4e1ccd Mon Sep 17 00:00:00 2001 From: Jacob Firek Date: Tue, 7 Mar 2023 11:57:06 -0500 Subject: [PATCH 1/3] feat: adding vault active event --- crates/vault-registry/src/lib.rs | 4 ++++ crates/vault-registry/src/types.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/crates/vault-registry/src/lib.rs b/crates/vault-registry/src/lib.rs index e4711f006e..06dcd16ea1 100644 --- a/crates/vault-registry/src/lib.rs +++ b/crates/vault-registry/src/lib.rs @@ -510,6 +510,10 @@ pub mod pallet { vault_id: DefaultVaultId, banned_until: T::BlockNumber, }, + ActiveVault { + vault_id: DefaultVaultId, + status: VaultStatus, + } } #[pallet::error] diff --git a/crates/vault-registry/src/types.rs b/crates/vault-registry/src/types.rs index bb93b36587..d3bfae09be 100644 --- a/crates/vault-registry/src/types.rs +++ b/crates/vault-registry/src/types.rs @@ -513,6 +513,10 @@ impl RichVault { pub(crate) fn set_accept_new_issues(&mut self, accept_new_issues: bool) -> DispatchResult { self.update(|v| { v.status = VaultStatus::Active(accept_new_issues); + Self::deposit_event(Event::::ActiveVault { + vault_id: v.id(), + status: VaultStatus::Active(accept_new_issues) + }); Ok(()) }) } From 013fc9230ca6c019abc707639dc5622b2960d5b8 Mon Sep 17 00:00:00 2001 From: Jacob Firek Date: Wed, 8 Mar 2023 11:43:51 -0500 Subject: [PATCH 2/3] chore: running cargo fmt --- crates/vault-registry/src/lib.rs | 2 +- crates/vault-registry/src/types.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/vault-registry/src/lib.rs b/crates/vault-registry/src/lib.rs index 06dcd16ea1..d81b351194 100644 --- a/crates/vault-registry/src/lib.rs +++ b/crates/vault-registry/src/lib.rs @@ -513,7 +513,7 @@ pub mod pallet { ActiveVault { vault_id: DefaultVaultId, status: VaultStatus, - } + }, } #[pallet::error] diff --git a/crates/vault-registry/src/types.rs b/crates/vault-registry/src/types.rs index d3bfae09be..925805e575 100644 --- a/crates/vault-registry/src/types.rs +++ b/crates/vault-registry/src/types.rs @@ -515,7 +515,7 @@ impl RichVault { v.status = VaultStatus::Active(accept_new_issues); Self::deposit_event(Event::::ActiveVault { vault_id: v.id(), - status: VaultStatus::Active(accept_new_issues) + status: VaultStatus::Active(accept_new_issues), }); Ok(()) }) From 23827815068db05f60b4f90139b0e82ee6e2f7ac Mon Sep 17 00:00:00 2001 From: Jacob Firek Date: Tue, 4 Apr 2023 16:01:27 -0400 Subject: [PATCH 3/3] chore: adding crate::Event --- crates/vault-registry/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vault-registry/src/types.rs b/crates/vault-registry/src/types.rs index 925805e575..5c65055a42 100644 --- a/crates/vault-registry/src/types.rs +++ b/crates/vault-registry/src/types.rs @@ -513,7 +513,7 @@ impl RichVault { pub(crate) fn set_accept_new_issues(&mut self, accept_new_issues: bool) -> DispatchResult { self.update(|v| { v.status = VaultStatus::Active(accept_new_issues); - Self::deposit_event(Event::::ActiveVault { + Self::deposit_event(crate::Event::::ActiveVault { vault_id: v.id(), status: VaultStatus::Active(accept_new_issues), });