Skip to content

Commit

Permalink
ffi: remove CustomNostrDatabase trait
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
yukibtc committed Nov 19, 2024
1 parent 9be15a8 commit 4da38c9
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 334 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
* nostr: remove `Marker::Custom` variant ([Yuki Kishimoto])
* pool: remove `Relay::support_negentropy` ([Yuki Kishimoto])
* pool: remove `Error::NotConnectedStatusChanged` variant ([Yuki Kishimoto])
* ffi: remove `CustomNostrDatabase` trait ([Yuki Kishimoto])

### Deprecated

Expand Down
94 changes: 0 additions & 94 deletions bindings/nostr-sdk-ffi/python/examples/custom-database.py

This file was deleted.

1 change: 0 additions & 1 deletion bindings/nostr-sdk-ffi/python/examples/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ async def main():
client = ClientBuilder().database(database).build()

await client.add_relay("wss://relay.damus.io")
await client.add_relay("wss://atl.purplerelay.com")
await client.connect()

# Negentropy reconciliation
Expand Down
228 changes: 0 additions & 228 deletions bindings/nostr-sdk-ffi/src/database/custom.rs

This file was deleted.

11 changes: 0 additions & 11 deletions bindings/nostr-sdk-ffi/src/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ use nostr_sdk::NdbDatabase;
use nostr_sdk::NostrLMDB;
use uniffi::Object;

pub mod custom;
pub mod events;

use self::custom::{CustomNostrDatabase, IntermediateCustomNostrDatabase};
use self::events::Events;
use crate::error::Result;
use crate::profile::Profile;
Expand Down Expand Up @@ -66,15 +64,6 @@ impl NostrDatabase {

#[uniffi::export(async_runtime = "tokio")]
impl NostrDatabase {
#[uniffi::constructor]
pub fn custom(database: Arc<dyn CustomNostrDatabase>) -> Self {
let intermediate = IntermediateCustomNostrDatabase { inner: database };

Self {
inner: intermediate.into_nostr_database(),
}
}

/// Save [`Event`] into store
///
/// Return `true` if event was successfully saved into database.
Expand Down

0 comments on commit 4da38c9

Please sign in to comment.