paid-services 4.3.2 → 4.3.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
- ## Version 4.3.2
3
+ ## Version 4.3.3
4
4
 
5
5
  - `createGroupChannel`: Show members that are present
6
6
 
@@ -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
@@ -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.2"
50
+ "version": "4.3.3"
51
51
  }