Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 446ce6e

Browse files
authored
Merge pull request #476 from lightninglabs/fix-channel-close
Don’t force close and already closing channel
2 parents 0f8bdab + c48cb96 commit 446ce6e

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/action/channel.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,7 @@ class ChannelAction {
177177
try {
178178
const { selectedChannel } = this._store;
179179
this._nav.goChannels();
180-
await this.closeChannel({
181-
channelPoint: selectedChannel.channelPoint,
182-
force: !selectedChannel.status.includes('open'), // force close already closing
183-
});
180+
await this.closeChannel({ channelPoint: selectedChannel.channelPoint });
184181
} catch (err) {
185182
this._notification.display({ msg: 'Closing channel failed!', err });
186183
}

test/unit/action/channel.spec.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,6 @@ describe('Action Channels Unit Tests', () => {
265265
expect(nav.goChannels, 'was called once');
266266
expect(channel.closeChannel, 'was called with', {
267267
channelPoint: 'some-channel-point',
268-
force: false,
269-
});
270-
});
271-
272-
it('should force close pending-closing channel', async () => {
273-
store.selectedChannel.status = 'pending-closing';
274-
await channel.closeSelectedChannel();
275-
expect(channel.closeChannel, 'was called with', {
276-
channelPoint: 'some-channel-point',
277-
force: true,
278268
});
279269
});
280270

0 commit comments

Comments
 (0)