Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ln-service

Package Overview
Dependencies
Maintainers
1
Versions
517
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ln-service - npm Package Compare versions

Comparing version 5.0.0 to 5.0.1

1

lightning/get_routes.js

@@ -30,2 +30,3 @@ const BN = require('bn.js');

fee: <Route Fee Tokens Number>
timeout: <Timeout Block Height Number>
}]

@@ -32,0 +33,0 @@ }

@@ -12,2 +12,3 @@ const BN = require('bn.js');

total_fees_msat: <Route Total Fees MSats String>
total_time_lock: <Route Total Timelock Number>
}]

@@ -24,2 +25,3 @@ }

fee: <Route Fee Tokens Number>
timeout: <Timeout Block Height Number>
}]

@@ -44,3 +46,11 @@ }

const invalidRoute = routes.find(route => {
return typeof route.total_fees_msat !== 'string';
if (typeof route.total_fees_msat !== 'string') {
return true;
}
if (typeof route.total_time_lock !== 'number') {
return true;
}
return false;
});

@@ -56,3 +66,6 @@

return {fee: totalFeesMsat.div(msatsPerToken).toNumber()};
return {
fee: totalFeesMsat.div(msatsPerToken).toNumber(),
timeout: route.total_time_lock,
};
}),

@@ -59,0 +72,0 @@ };

6

package.json

@@ -16,3 +16,3 @@ {

"express-basic-auth": "1.1.5",
"grpc": "1.12.2",
"grpc": "1.12.4",
"lodash": "4.17.10",

@@ -23,3 +23,3 @@ "morgan": "1.9.0",

"walnut": "0.0.4",
"ws": "5.2.0"
"ws": "5.2.1"
},

@@ -51,3 +51,3 @@ "description": "Interaction helper for your Lightning Network daemon",

},
"version": "5.0.0"
"version": "5.0.1"
}

@@ -27,3 +27,3 @@ const {deepIs} = require('tap');

error: 'ExpectedValidRoutes',
response: {routes: [{total_fees_msat: null}]},
response: {routes: [{total_fees_msat: null, total_time_lock: 31337}]},
},

@@ -33,4 +33,4 @@

_: 'Valid routes',
expected: {routes: [{fee: 1}]},
response: {routes: [{total_fees_msat: '1000'}]},
expected: {routes: [{fee: 1, timeout: 31337}]},
response: {routes: [{total_fees_msat: '1000', total_time_lock: 31337}]},
},

@@ -37,0 +37,0 @@ ];

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc