Skip to content

Commit

Permalink
fix: test_get_closed_channels.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SeverinAlexB committed Jul 12, 2024
1 parent 50d1c08 commit d4e3ada
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lnd_methods/offchain/get_closed_channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ module.exports = (args, cbk) => {
close_transaction_id: closeTxId,
anchor_spent_by: anchor?.spent_by,
anchor_vout: anchor?.anchor_vout,
anchor_is_confirmed: anchor? anchor.is_confirmed: false,
anchor_is_pending: anchor? anchor.is_pending: false,
anchor_is_confirmed: anchor.is_confirmed !== undefined? anchor.is_confirmed: false,
anchor_is_pending: anchor.is_pending !== undefined? anchor.is_pending: false,
final_local_balance: Number(chan.settled_balance),
final_time_locked_balance: finalTimeLock,
id: !chanId ? undefined : chanId.channel,
Expand Down
4 changes: 4 additions & 0 deletions test/lnd_methods/offchain/test_get_closed_channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ const makeExpectedChannel = ({override}) => {
partner_public_key: 'b',
transaction_id: '00',
transaction_vout: 1,
anchor_spent_by: undefined,
anchor_vout: undefined,
anchor_is_confirmed: false,
anchor_is_pending: false,
};

Object.keys(override || {}).forEach(key => expected[key] = override[key]);
Expand Down

0 comments on commit d4e3ada

Please sign in to comment.