Skip to content

Conversation

TheBlueMatt
Copy link
Collaborator

In c13b6d8 and
fc14495 we implemented Readable for Refund and Offers, but didn't do so for Bolt12Invoice.

Because Bolt12Invoices are not serializable to strings, we generally expect users to read and write them as byte arrays, and currently expose this via TryFrom<Vec<u8>>. This is fine, but there's no reason to not implement Readable as well, and it saves having to implement TryFrom in bindings.

In c13b6d8 and
fc14495 we implemented `Readable`
for `Refund` and `Offer`s, but didn't do so for `Bolt12Invoice`.

Because `Bolt12Invoice`s are not serializable to strings, we
generally expect users to read and write them as byte arrays, and
currently expose this via `TryFrom<Vec<u8>>`. This is fine, but
there's no reason to not implement `Readable` as well, and it
saves having to implement `TryFrom` in bindings.
}
}

impl Readable for Bolt12Invoice {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already implemented on line 1122 as part of #3078.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I missed that 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants