From 35f8235b68d93894d773b72911aa5abefb6620e4 Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Thu, 21 Sep 2017 21:37:46 -0500 Subject: [PATCH] fix(copy, live updates): fix copy change, add timestamp to new invoices, dispatch fetch payments after successful payment --- app/lnd/methods/index.js | 2 +- app/reducers/activity.js | 2 +- app/reducers/payment.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/lnd/methods/index.js b/app/lnd/methods/index.js index 6f8b9b05..c3cf80fd 100644 --- a/app/lnd/methods/index.js +++ b/app/lnd/methods/index.js @@ -86,7 +86,7 @@ export default function (lnd, event, msg, data) { .then(newinvoice => event.sender.send( 'createdInvoice', - Object.assign(newinvoice, { memo: data.memo, value: data.value, r_hash: new Buffer(newinvoice.r_hash, 'hex').toString('hex') }) + Object.assign(newinvoice, { memo: data.memo, value: data.value, r_hash: new Buffer(newinvoice.r_hash, 'hex').toString('hex'), creation_date: (Date.now() / 1000) }) ) ) .catch(error => console.log('addInvoice error: ', error)) diff --git a/app/reducers/activity.js b/app/reducers/activity.js index 77913b68..d7c1d06b 100644 --- a/app/reducers/activity.js +++ b/app/reducers/activity.js @@ -5,7 +5,7 @@ import { createSelector } from 'reselect' // ------------------------------------ const initialState = { filterPulldown: false, - filter: { key: 'ALL_ACTIVITY', name: 'Activity' }, + filter: { key: 'ALL_ACTIVITY', name: 'All Activity' }, filters: [ { key: 'ALL_ACTIVITY', name: 'All Activity' }, { key: 'LN_ACTIVITY', name: 'LN Activity' }, diff --git a/app/reducers/payment.js b/app/reducers/payment.js index d8e44775..710a4a94 100644 --- a/app/reducers/payment.js +++ b/app/reducers/payment.js @@ -71,7 +71,7 @@ export const paymentSuccessful = () => (dispatch) => { dispatch(setForm({ modalOpen: false })) // Refetch payments (TODO: dont do a full refetch, rather append new tx to list) - fetchPayments() + dispatch(fetchPayments()) // Reset the payment form dispatch(resetForm())