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

Commit c48cb96

Browse files
committed
Don’t force close and already closing channel
1 parent 04a4e7f commit c48cb96

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
@@ -175,10 +175,7 @@ class ChannelAction {
175175
try {
176176
const { selectedChannel } = this._store;
177177
this._nav.goChannels();
178-
await this.closeChannel({
179-
channelPoint: selectedChannel.channelPoint,
180-
force: !selectedChannel.status.includes('open'), // force close already closing
181-
});
178+
await this.closeChannel({ channelPoint: selectedChannel.channelPoint });
182179
} catch (err) {
183180
this._notification.display({ msg: 'Closing channel failed!', err });
184181
}

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)