Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

Issue with return data transformation #2

@niteshbalusu11

Description

@niteshbalusu11

When doing calls using @core-ln/core library, the return values that contain strings types are attempted to being converted into numbers and the output is resulting in NaN because it's attempting to convert strings into numbers that are not numbers.

Version of core-lightning: v0.12.1

Example getinfo output:

{
  id: NaN,
  alias: NaN,
  color: NaN,
  num_peers: 1,
  num_pending_channels: 0,
  num_active_channels: 1,
  num_inactive_channels: 0,
  address: [],
  binding: [ { type: NaN, address: NaN, port: 7171 } ],
  version: NaN,
  blockheight: 108,
  network: NaN,
  fees_collected_msat: 0,
  'lightning-dir': NaN,
  our_features: { init: NaN, node: NaN, channel: '', invoice: 2000020024100 }
}

Example of working output from lightning-cli

{
   "id": "02bef50633bf71a1e5b2e9e66cb2640bed27bcd93a0f89cc83db49c47a9ff0e0dc",
   "alias": "SLIMYCHEF-v0.12.1",
   "color": "02bef5",
   "num_peers": 1,
   "num_pending_channels": 0,
   "num_active_channels": 1,
   "num_inactive_channels": 0,
   "address": [],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 7171
      }
   ],
   "version": "v0.12.1",
   "blockheight": 108,
   "network": "regtest",
   "fees_collected_msat": 0,
   "lightning-dir": "/tmp/l1-regtest/regtest",
   "our_features": {
      "init": "08a080282269a2",
      "node": "88a080282269a2",
      "channel": "",
      "invoice": "02000020024100"
   }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions