@@ -2,10 +2,11 @@ use crate::Config;
2
2
#[ cfg( not( target_arch = "wasm32" ) ) ]
3
3
use bcr_ebill_persistence:: get_surreal_db;
4
4
use bcr_ebill_persistence:: {
5
- BackupStoreApi , ContactStoreApi , NostrEventOffsetStoreApi , NotificationStoreApi ,
6
- SurrealBackupStore , SurrealBillChainStore , SurrealBillStore , SurrealCompanyChainStore ,
7
- SurrealCompanyStore , SurrealContactStore , SurrealIdentityChainStore , SurrealIdentityStore ,
8
- SurrealNostrEventOffsetStore , SurrealNotificationStore ,
5
+ BackupStoreApi , ContactStoreApi , NostrChainEventStoreApi , NostrEventOffsetStoreApi ,
6
+ NotificationStoreApi , SurrealBackupStore , SurrealBillChainStore , SurrealBillStore ,
7
+ SurrealCompanyChainStore , SurrealCompanyStore , SurrealContactStore , SurrealIdentityChainStore ,
8
+ SurrealIdentityStore , SurrealNostrChainEventStore , SurrealNostrEventOffsetStore ,
9
+ SurrealNotificationStore ,
9
10
bill:: { BillChainStoreApi , BillStoreApi } ,
10
11
company:: { CompanyChainStoreApi , CompanyStoreApi } ,
11
12
db:: {
@@ -49,6 +50,7 @@ pub struct DbContext {
49
50
pub queued_message_store : Arc < dyn NostrQueuedMessageStoreApi > ,
50
51
pub nostr_contact_store : Arc < dyn NostrContactStoreApi > ,
51
52
pub mint_store : Arc < dyn MintStoreApi > ,
53
+ pub nostr_chain_event_store : Arc < dyn NostrChainEventStoreApi > ,
52
54
}
53
55
54
56
/// Creates a new instance of the DbContext with the given SurrealDB configuration.
@@ -109,6 +111,8 @@ pub async fn get_db_context(
109
111
let queued_message_store = Arc :: new ( SurrealNostrEventQueueStore :: new ( surreal_wrapper. clone ( ) ) ) ;
110
112
let nostr_contact_store = Arc :: new ( SurrealNostrContactStore :: new ( surreal_wrapper. clone ( ) ) ) ;
111
113
let mint_store = Arc :: new ( SurrealMintStore :: new ( surreal_wrapper. clone ( ) ) ) ;
114
+ let nostr_chain_event_store =
115
+ Arc :: new ( SurrealNostrChainEventStore :: new ( surreal_wrapper. clone ( ) ) ) ;
112
116
113
117
Ok ( DbContext {
114
118
contact_store,
@@ -125,5 +129,6 @@ pub async fn get_db_context(
125
129
queued_message_store,
126
130
nostr_contact_store,
127
131
mint_store,
132
+ nostr_chain_event_store,
128
133
} )
129
134
}
0 commit comments