lightning 5.16.2 → 5.16.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Versions
2
2
 
3
- ## 5.16.2
3
+ ## 5.16.3
4
4
 
5
5
  - `signTransaction`: Add `root_hash` to support Taproot signatures with scripts
6
6
 
@@ -105,6 +105,10 @@ module.exports = (args, cbk) => {
105
105
  return cbk([400, 'ExpectedArrayOfRoutesToPayViaRoutes']);
106
106
  }
107
107
 
108
+ if (!!args.routes.filter(n => !n).length) {
109
+ return cbk([400, 'ExpectedArrayOfRoutesToAttemptPayingOver']);
110
+ }
111
+
108
112
  if (args.routes.findIndex(n => !isArray(n.hops)) !== notFound) {
109
113
  return cbk([400, 'ExpectedArrayOfHopsForPayViaRoute']);
110
114
  }
package/package.json CHANGED
@@ -8,12 +8,12 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@grpc/grpc-js": "1.6.7",
11
- "@grpc/proto-loader": "0.6.12",
11
+ "@grpc/proto-loader": "0.6.13",
12
12
  "@types/express": "4.17.13",
13
- "@types/node": "17.0.38",
13
+ "@types/node": "17.0.41",
14
14
  "@types/request": "2.48.8",
15
15
  "@types/ws": "8.5.3",
16
- "async": "3.2.3",
16
+ "async": "3.2.4",
17
17
  "asyncjs-util": "1.2.9",
18
18
  "bitcoinjs-lib": "6.0.1",
19
19
  "bn.js": "5.2.1",
@@ -24,7 +24,7 @@
24
24
  "ecpair": "2.0.1",
25
25
  "express": "4.18.1",
26
26
  "invoices": "2.0.7",
27
- "psbt": "2.4.0",
27
+ "psbt": "2.6.0",
28
28
  "tiny-secp256k1": "2.2.1",
29
29
  "type-fest": "2.13.0"
30
30
  },
@@ -33,7 +33,7 @@
33
33
  "@alexbosworth/node-fetch": "2.6.2",
34
34
  "@alexbosworth/tap": "15.0.11",
35
35
  "tsd": "0.20.0",
36
- "typescript": "4.7.2",
36
+ "typescript": "4.7.3",
37
37
  "ws": "8.7.0"
38
38
  },
39
39
  "engines": {
@@ -59,5 +59,5 @@
59
59
  "directory": "test/typescript"
60
60
  },
61
61
  "types": "index.d.ts",
62
- "version": "5.16.2"
62
+ "version": "5.16.3"
63
63
  }
@@ -57,6 +57,28 @@ const tests = [
57
57
  description: 'A non-empty array of routes is expected',
58
58
  error: [400, 'ExpectedArrayOfRoutesToPayViaRoutes'],
59
59
  },
60
+ {
61
+ args: {
62
+ lnd: {
63
+ default: {deletePayment, getInfo},
64
+ router: {sendToRouteV2: ({}, cbk) => cbk(null, {})},
65
+ },
66
+ routes: [null],
67
+ },
68
+ description: 'An array of non-empty routes is expected',
69
+ error: [400, 'ExpectedArrayOfRoutesToAttemptPayingOver'],
70
+ },
71
+ {
72
+ args: {
73
+ lnd: {
74
+ default: {deletePayment, getInfo},
75
+ router: {sendToRouteV2: ({}, cbk) => cbk(null, {})},
76
+ },
77
+ routes: [{}],
78
+ },
79
+ description: 'Routes are expected to have hops',
80
+ error: [400, 'ExpectedArrayOfHopsForPayViaRoute'],
81
+ },
60
82
  {
61
83
  args: {
62
84
  lnd: {