paid-services 4.3.2 → 4.3.4
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,5 +1,6 @@
|
|
|
1
1
|
const asyncAuto = require('async/auto');
|
|
2
2
|
const asyncEach = require('async/each');
|
|
3
|
+
const {connectPeer} = require('ln-sync');
|
|
3
4
|
const {fundPsbtDisallowingInputs} = require('ln-sync');
|
|
4
5
|
const {getNetwork} = require('ln-sync');
|
|
5
6
|
const {getUtxos} = require('ln-service');
|
|
@@ -84,8 +85,18 @@ module.exports = ({capacity, count, lnd, rate, to}, cbk) => {
|
|
|
84
85
|
// Get the bitcoinjs network name for dummy output derivation
|
|
85
86
|
getNetwork: ['validate', ({}, cbk) => getNetwork({lnd}, cbk)],
|
|
86
87
|
|
|
88
|
+
// Make sure the peer is connected
|
|
89
|
+
connect: ['getNetwork', ({}, cbk) => {
|
|
90
|
+
// Exit early when this is a pair group
|
|
91
|
+
if (!to) {
|
|
92
|
+
return cbk();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return connectPeer({lnd, id: to}, cbk);
|
|
96
|
+
}],
|
|
97
|
+
|
|
87
98
|
// Propose the channel to get an address to fund
|
|
88
|
-
propose: ['getNetwork', ({getNetwork}, cbk) => {
|
|
99
|
+
propose: ['connect', 'getNetwork', ({getNetwork}, cbk) => {
|
|
89
100
|
const tokens = halfOf(capacity);
|
|
90
101
|
|
|
91
102
|
// Exit early when there is a shared proposal due to a pair group
|
package/package.json
CHANGED
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"bolt01": "1.2.6",
|
|
15
15
|
"bolt07": "1.8.3",
|
|
16
16
|
"ecpair": "2.1.0",
|
|
17
|
-
"goldengate": "12.0.
|
|
17
|
+
"goldengate": "12.0.4",
|
|
18
18
|
"invoices": "2.2.3",
|
|
19
|
-
"ln-service": "54.
|
|
20
|
-
"ln-sync": "4.3.
|
|
19
|
+
"ln-service": "54.10.5",
|
|
20
|
+
"ln-sync": "4.3.1",
|
|
21
21
|
"psbt": "2.7.2",
|
|
22
22
|
"p2tr": "1.3.3",
|
|
23
23
|
"tiny-secp256k1": "2.2.1"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"description": "Lightning Paid Services library",
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@alexbosworth/tap": "15.0.12",
|
|
28
|
-
"ln-docker-daemons": "4.
|
|
28
|
+
"ln-docker-daemons": "4.1.2",
|
|
29
29
|
"mock-lnd": "1.4.4",
|
|
30
30
|
"secp256k1": "5.0.0"
|
|
31
31
|
},
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"integration-tests": "tap -j 2 --branches=1 --functions=1 --lines=1 --statements=1 -t 180 test/integration/*.js",
|
|
48
48
|
"test": "tap --branches=1 --functions=1 --lines=1 --statements=1 -t 60 test/actions/*.js test/balanced/*.js test/capacity/*.js test/client/*.js test/config/*.js test/p2p/*.js test/records/*.js test/respond/*.js test/server/*.js test/swaps/*.js test/services/*.js test/trades/*.js"
|
|
49
49
|
},
|
|
50
|
-
"version": "4.3.
|
|
50
|
+
"version": "4.3.4"
|
|
51
51
|
}
|