Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
fix: issue with adding new LN invoice
Browse files Browse the repository at this point in the history
  • Loading branch information
korhaliv committed Aug 22, 2019
1 parent 841a1d1 commit 74c5a08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion renderer/reducers/invoice.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,9 @@ const ACTION_HANDLERS = {
},
[UPDATE_INVOICE]: (state, { invoice }) => {
const invoiceIndex = state.invoices.findIndex(
invoice => invoice.r_hash.toString('hex') === invoice.r_hash.toString('hex')
inv => inv.r_hash.toString('hex') === invoice.r_hash.toString('hex')
)

// update if exists or add new otherwise
if (invoiceIndex >= 0) {
state.invoices[invoiceIndex] = { ...state.invoices[invoiceIndex], ...invoice }
Expand Down

0 comments on commit 74c5a08

Please sign in to comment.