Read commitFee correctly for pending-open channel

parent c82e2571
......@@ -137,7 +137,6 @@ class ChannelAction {
capacity: channel.capacity,
localBalance: channel.localBalance,
remoteBalance: channel.remoteBalance,
commitFee: channel.commitFee || 0,
channelPoint: channel.channelPoint,
fundingTxId: this._parseChannelPoint(channel.channelPoint)
.fundingTxidStr,
......@@ -146,6 +145,7 @@ class ChannelAction {
...mapPendingAttributes(poc.channel),
confirmationHeight: poc.confirmationHeight,
blocksTillOpen: poc.blocksTillOpen,
commitFee: poc.commitFee,
feePerKw: poc.feePerKw,
status: 'pending-open',
}));
......
......@@ -143,13 +143,14 @@ describe('Action Channels Unit Tests', () => {
capacity: 100,
localBalance: 10,
remoteBalance: 90,
commitFee: 15,
channelPoint: 'FFFF:1',
};
it('should list pending channels', async () => {
grpc.sendCommand.withArgs('pendingChannels').resolves({
pendingOpenChannels: [{ channel: { ...pendingChannel } }],
pendingOpenChannels: [
{ channel: { ...pendingChannel }, commitFee: 15 },
],
pendingClosingChannels: [{ channel: { ...pendingChannel } }],
pendingForceClosingChannels: [
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment