@ -3,6 +3,7 @@ import { fetchTicker } from './ticker'
import { fetchBalance } from './balance'
import { fetchInfo } from './info'
import { requestBlockHeight } from '../api'
import { showNotification } from '../notifications'
// ------------------------------------
// Constants
@ -32,6 +33,12 @@ export const lndSynced = () => (dispatch) => {
dispatch(fetchInfo())
dispatch({ type: STOP_SYNCING })
// HTML 5 desktop notification for the new transaction
const notifTitle = 'Lightning Node Synced'
const notifBody = 'Visa who? You\'re your own payment processor now!'
showNotification(notifTitle, notifBody)
}
export const grpcDisconnected = () => (dispatch) => dispatch({ type: GRPC_DISCONNECTED })
@ -1,6 +1,7 @@
import { ipcRenderer } from 'electron'
import { btc, usd } from '../utils'
import { newAddress } from './address'
import { setFormType } from './form'
import { resetPayForm } from './payform'
@ -85,6 +86,9 @@ export const newTransaction = (event, { transaction }) => (dispatch) => {
const notifBody = transaction.amount > 0 ? 'Lucky you, you just received a new on-chain transaction. I\'m jealous.' : 'Hate to see \'em go but love to watch \'em leave. Your on-chain transaction successfully sent.' // eslint-disable-line
// Generate a new address
dispatch(newAddress('p2pkh'))