Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate remaining pb:: dependencies to cln::* #585

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libs/sdk-core/src/breez_services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ impl BreezServices {
match paid_invoice_res {
Ok(Some(i)) => {
debug!("invoice stream got new invoice");
if let Some(gl_client::pb::incoming_payment::Details::Offchain(p)) = i.details {
if let Some(gl_client::signer::model::greenlight::incoming_payment::Details::Offchain(p)) = i.details {
let payment: Option<crate::models::Payment> = p.clone().try_into().ok();
if payment.is_some() {
let res = cloned
Expand Down
12 changes: 6 additions & 6 deletions libs/sdk-core/src/greenlight/backup_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
};

use super::node_api::Greenlight;
use gl_client::{node, pb};
use gl_client::{node, pb::cln};
use std::sync::Arc;

const BREEZ_SDK_DATASTORE_PATH: [&str; 2] = ["breez-sdk", "backup"];
Expand All @@ -24,8 +24,8 @@ impl BackupTransport for GLBackupTransport {
async fn pull(&self) -> SdkResult<Option<BackupState>> {
let key = self.gl_key();
let mut c: node::ClnClient = self.inner.get_node_client().await?;
let response: pb::cln::ListdatastoreResponse = c
.list_datastore(pb::cln::ListdatastoreRequest { key })
let response: cln::ListdatastoreResponse = c
.list_datastore(cln::ListdatastoreRequest { key })
.await?
.into_inner();
let store = response.datastore;
Expand All @@ -45,12 +45,12 @@ impl BackupTransport for GLBackupTransport {
let key = self.gl_key();
info!("set_value key = {:?} data length={:?}", key, hex.len());
let mut c: node::ClnClient = self.inner.get_node_client().await?;
let mut mode = pb::cln::datastore_request::DatastoreMode::MustCreate;
let mut mode = cln::datastore_request::DatastoreMode::MustCreate;
if version.is_some() {
mode = pb::cln::datastore_request::DatastoreMode::MustReplace;
mode = cln::datastore_request::DatastoreMode::MustReplace;
}
let response = c
.datastore(pb::cln::DatastoreRequest {
.datastore(cln::DatastoreRequest {
key,
string: None,
hex: Some(hex),
Expand Down
Loading
Loading