Closed MrHash closed 4 years ago
Looking into this, @MrHash. As far as I know the state
should always be returned. The 0 index certainly seems like the cause if it's not being returned for OPEN orders. I'll follow up soon.
As suspected, protobuf.js considers 0
to be a default value and strips it out of the response. There is a configuration option that we can set internally, which will prevent these values from being stripped out.
Unfortunately, it could be a breaking change for consumers of this library. As such, it makes sense to hold off on a fix until LND v0.9.0-beta
, when other breaking changes will be expected.
Alright then i can work around this issue if only the OPENED state is missing. Thanks
Thinking more about it, we can expose an optional config value to prevent the stripping of falsy values from the response prior to the v0.9.0-beta
release.
Is this the GRPC object options? I thought it would be nice if those could be overridden as i'd like to keep case also.
although maybe that would create some other issues in the code. not sure.
The issue with allowing the library consumer to provide any of the grpc load options is that some will either break the package completely or invalidate the types. For example, keepCase
will invalidate the types because they are written for camel case only.
OK understood.
Resolved in #69 and released in v0.8.2-beta
When an invoice is added in LND the invoice
state
field and other empty fields are not populated in to the response. I'm wondering if empty fields are excluded, and whether InvoiceState::OPEN being value 0 is the cause.