From 3a59c27308e93965c88b1a3e138ec87041e157ba Mon Sep 17 00:00:00 2001 From: Travis Eden Date: Wed, 30 May 2018 15:23:48 -0400 Subject: [PATCH] stop de/restructuring notificationProps; add path as valid prop --- dist/bundle.js | 39 ++++++++++++++++------------- src/redux/reducers/notifications.js | 9 +------ src/types/Notification.js | 1 + 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 46c9ed0..af50e37 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -46,19 +46,34 @@ return /******/ (function(modules) { // webpackBootstrap /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? @@ -1078,6 +1093,7 @@ exports.selectSearchState = _search3.selectState; };*/ /*:: export type NotificationProps = { uri: ?string, + path: ?string, };*/ /***/ }), @@ -5243,11 +5259,6 @@ reducers[ACTIONS.CREATE_NOTIFICATION] = function (state, action) { error = notification.error, displayType = notification.displayType, id = notification.id; - var uri = notificationProps.uri, - nout = notificationProps.nout, - txid = notificationProps.txid, - amount = notificationProps.amount, - address = notificationProps.address; var queue = Object.assign([], state.queue); @@ -5260,13 +5271,7 @@ reducers[ACTIONS.CREATE_NOTIFICATION] = function (state, action) { error: error, displayType: displayType }, - notificationProps: { - uri: uri, - txid: txid, - nout: nout, - amount: amount, - address: address - } + notificationProps: notificationProps }); return Object.assign({}, state, { diff --git a/src/redux/reducers/notifications.js b/src/redux/reducers/notifications.js index 8ea3eb8..a7b1769 100644 --- a/src/redux/reducers/notifications.js +++ b/src/redux/reducers/notifications.js @@ -11,7 +11,6 @@ const defaultState = { reducers[ACTIONS.CREATE_NOTIFICATION] = (state, action) => { const { notification, notificationProps } = action.data; const { title, message, type, error, displayType, id } = notification; - const { uri, nout, txid, amount, address } = notificationProps; const queue = Object.assign([], state.queue); queue.push({ @@ -23,13 +22,7 @@ reducers[ACTIONS.CREATE_NOTIFICATION] = (state, action) => { error, displayType, }, - notificationProps: { - uri, - txid, - nout, - amount, - address, - }, + notificationProps, }); return Object.assign({}, state, { diff --git a/src/types/Notification.js b/src/types/Notification.js index 68aacca..9bee19a 100644 --- a/src/types/Notification.js +++ b/src/types/Notification.js @@ -15,4 +15,5 @@ export type Notification = { // Used for retreiving data from redux store export type NotificationProps = { uri: ?string, + path: ?string, };