Skip to content

Commit eedd12a

Browse files
benthecarmanclaude
andcommitted
Update breez-sdk-spark revision
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2762df2 commit eedd12a

3 files changed

Lines changed: 35 additions & 5 deletions

File tree

orange-sdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ lightning-macros = "0.2.0"
2828
bitcoin-payment-instructions = { workspace = true, features = ["http"] }
2929
chrono = { version = "0.4", default-features = false }
3030
rand = { version = "0.8.5", optional = true }
31-
breez-sdk-spark = { git = "https://github.com/breez/spark-sdk.git", rev = "1000f276d2f16592b5f6eb8fce29228f34ff88bf", default-features = false, optional = true }
31+
breez-sdk-spark = { git = "https://github.com/breez/spark-sdk.git", rev = "0d8db793618a4f9eaf8098d759baefe58ea2da49", default-features = false, optional = true }
3232
tokio = { version = "1.0", default-features = false, features = ["rt-multi-thread", "sync", "macros"] }
3333
uuid = { version = "1.0", default-features = false, optional = true }
3434
cdk = { version = "0.15.1", default-features = false, features = ["wallet"], optional = true }

orange-sdk/src/trusted_wallet/spark/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl SparkWalletConfig {
8787
optimization_config: OptimizationConfig { auto_enabled: true, multiplicity: 1 },
8888
stable_balance_config: None,
8989
max_concurrent_claims: 4,
90-
support_lnurl_verify: false,
90+
spark_config: None,
9191
})
9292
}
9393
}
@@ -416,6 +416,12 @@ impl EventListener for SparkEventHandler {
416416
SdkEvent::Optimization { optimization_event } => {
417417
log_debug!(self.logger, "Spark optimization event: {optimization_event:?}");
418418
},
419+
SdkEvent::LightningAddressChanged { lightning_address } => {
420+
log_debug!(self.logger, "Spark lightning address changed: {lightning_address:?}");
421+
},
422+
SdkEvent::NewDeposits { new_deposits } => {
423+
log_info!(self.logger, "Spark wallet new deposits: {new_deposits:?}");
424+
},
419425
}
420426
}
421427
}

orange-sdk/src/trusted_wallet/spark/spark_store.rs

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use breez_sdk_spark::sync_storage::{
99
IncomingChange, OutgoingChange, Record, RecordChange, RecordId, UnversionedRecordChange,
1010
};
1111
use breez_sdk_spark::{
12-
DepositInfo, Payment, PaymentDetails, PaymentMetadata, SetLnurlMetadataItem, StorageError,
13-
StorageListPaymentsRequest, UpdateDepositPayload,
12+
Contact, DepositInfo, ListContactsRequest, Payment, PaymentDetails, PaymentMetadata,
13+
SetLnurlMetadataItem, StorageError, StorageListPaymentsRequest, UpdateDepositPayload,
1414
};
1515
use ldk_node::DynStore;
1616
use ldk_node::lightning::util::persist::KVSTORE_NAMESPACE_KEY_MAX_LEN;
@@ -298,6 +298,7 @@ impl breez_sdk_spark::Storage for SparkStore {
298298
lnurl_withdraw_info: metadata.lnurl_withdraw_info.or(existing.lnurl_withdraw_info),
299299
lnurl_description: metadata.lnurl_description.or(existing.lnurl_description),
300300
conversion_info: metadata.conversion_info.or(existing.conversion_info),
301+
conversion_status: metadata.conversion_status.or(existing.conversion_status),
301302
}
302303
} else {
303304
metadata
@@ -407,13 +408,14 @@ impl breez_sdk_spark::Storage for SparkStore {
407408
}
408409

409410
async fn add_deposit(
410-
&self, txid: String, vout: u32, amount_sats: u64,
411+
&self, txid: String, vout: u32, amount_sats: u64, is_mature: bool,
411412
) -> Result<(), StorageError> {
412413
let id = format!("{txid}:{vout}");
413414
let info = DepositInfo {
414415
txid,
415416
vout,
416417
amount_sats,
418+
is_mature,
417419
refund_tx: None,
418420
refund_tx_id: None,
419421
claim_error: None,
@@ -534,6 +536,28 @@ impl breez_sdk_spark::Storage for SparkStore {
534536
Ok(())
535537
}
536538

539+
async fn list_contacts(
540+
&self, _request: ListContactsRequest,
541+
) -> Result<Vec<Contact>, StorageError> {
542+
// Contacts are not used by orange-sdk
543+
Ok(Vec::new())
544+
}
545+
546+
async fn get_contact(&self, _id: String) -> Result<Contact, StorageError> {
547+
// Contacts are not used by orange-sdk
548+
Err(StorageError::Implementation("contacts are not supported".to_string()))
549+
}
550+
551+
async fn insert_contact(&self, _contact: Contact) -> Result<(), StorageError> {
552+
// Contacts are not used by orange-sdk
553+
Ok(())
554+
}
555+
556+
async fn delete_contact(&self, _id: String) -> Result<(), StorageError> {
557+
// Contacts are not used by orange-sdk
558+
Ok(())
559+
}
560+
537561
async fn add_outgoing_change(
538562
&self, record: UnversionedRecordChange,
539563
) -> Result<u64, StorageError> {

0 commit comments

Comments
 (0)