Skip to content

Commit e277d8d

Browse files
committed
Update to latest breez sdk
1 parent b28b07d commit e277d8d

2 files changed

Lines changed: 9 additions & 4 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 = "5f25eb6185950545e2ca170971667adc43c3544f", default-features = false, features = ["rustls-tls"], optional = true }
31+
breez-sdk-spark = { git = "https://github.com/breez/spark-sdk.git", rev = "551f453103e069697bc3850a2fb5d1c3d1871749", default-features = false, features = ["rustls-tls"], 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.14.2", default-features = false, features = ["wallet"], optional = true }

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ use bitcoin_payment_instructions::PaymentMethod;
1919
use bitcoin_payment_instructions::amount::Amount;
2020

2121
use breez_sdk_spark::{
22-
BreezSdk, EventListener, GetInfoRequest, ListPaymentsRequest, PaymentDetails, PaymentStatus,
23-
PaymentType, PrepareSendPaymentRequest, ReceivePaymentMethod, ReceivePaymentRequest,
24-
SdkBuilder, SdkError, SdkEvent, SendPaymentMethod, SendPaymentRequest,
22+
BreezSdk, EventListener, GetInfoRequest, ListPaymentsRequest, OptimizationConfig,
23+
PaymentDetails, PaymentStatus, PaymentType, PrepareSendPaymentRequest, ReceivePaymentMethod,
24+
ReceivePaymentRequest, SdkBuilder, SdkError, SdkEvent, SendPaymentMethod, SendPaymentRequest,
2525
};
2626

2727
use graduated_rebalancer::ReceivedLightningPayment;
@@ -77,6 +77,7 @@ impl SparkWalletConfig {
7777
max_deposit_claim_fee: None,
7878
lnurl_domain: None,
7979
private_enabled_default: true,
80+
optimization_config: OptimizationConfig { auto_enabled: true, multiplicity: 1 },
8081
})
8182
}
8283
}
@@ -129,6 +130,7 @@ impl TrustedWalletInterface for Spark {
129130
payment_method: ReceivePaymentMethod::Bolt11Invoice {
130131
description: "".to_string(), // empty description for smaller QRs and better privacy
131132
amount_sats,
133+
expiry_secs: None,
132134
},
133135
};
134136
let res = self.spark_wallet.receive_payment(params).await?;
@@ -354,6 +356,9 @@ impl EventListener for SparkEventHandler {
354356
"Spark payment pending event received for payment: {payment:?}"
355357
);
356358
},
359+
SdkEvent::Optimization { optimization_event } => {
360+
log_debug!(self.logger, "Spark optimization event: {optimization_event:?}");
361+
},
357362
}
358363
}
359364
}

0 commit comments

Comments
 (0)