-
Notifications
You must be signed in to change notification settings - Fork 43
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
Change short_channel_id to string #1082
Conversation
@@ -61,7 +61,7 @@ impl From<BoltzRouteHintHop> for RouteHintHop { | |||
fn from(value: BoltzRouteHintHop) -> Self { | |||
RouteHintHop { | |||
src_node_id: value.node_id, | |||
short_channel_id: 0_u64, | |||
short_channel_id: "0".to_string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
short_channel_id: "0".to_string(), | |
short_channel_id: "0x0x0".to_string(), |
libs/sdk-common/src/invoice.rs
Outdated
fn parse_short_channel_id(id_str: &str) -> InvoiceResult<u64> { | ||
let parts: Vec<&str> = id_str.split('x').collect(); | ||
if parts.len() != 3 { | ||
return Ok(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this was already there, but shouldn't this return an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to throw an error, also added some tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR changes the
short_channel_id
of theRouteHintHop
model to string in the format: