Merge pull request #137 from Permissionless-Software-Foundation/dh-redux-devtool

feat(redux): Added Redux dev tools
This commit is contained in:
Chris Troutner
2021-05-21 05:52:35 -07:00
committed by GitHub
+11 -5
View File
@@ -2,10 +2,7 @@ import { createStore as reduxCreateStore } from 'redux'
// Wallet from localStorage
import { getWalletInfo, setWalletInfo } from '../components/localWallet'
// import BchWallet from 'minimal-slp-wallet'
const BchWallet =
typeof window !== 'undefined'
? window.SlpWallet
: null
const BchWallet = typeof window !== 'undefined' ? window.SlpWallet : null
const reducer = (state, action) => {
// Update walletInfo state property
@@ -120,5 +117,14 @@ const initialState = {
}
}
const createStore = () => reduxCreateStore(reducer, initialState)
const createStore = () =>
reduxCreateStore(
reducer,
initialState,
/** Redux DevTools
* https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=es
*
*/
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
)
export default createStore