Common components refactor #1
|
@ -14,13 +14,13 @@ function apiCall(method, params, resolve, reject) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLocal(key, fallback = undefined) {
|
function getLocal(key, fallback = undefined) {
|
||||||
//const itemRaw = localStorage.getItem(key);
|
// const itemRaw = localStorage.getItem(key);
|
||||||
const itemRaw = null;
|
const itemRaw = null;
|
||||||
return itemRaw === null ? fallback : JSON.parse(itemRaw);
|
return itemRaw === null ? fallback : JSON.parse(itemRaw);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setLocal(key, value) {
|
function setLocal(key, value) {
|
||||||
//localStorage.setItem(key, JSON.stringify(value));
|
// localStorage.setItem(key, JSON.stringify(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -63,7 +63,7 @@ export function doGetNewAddress() {
|
||||||
Yes, we did. I was supposed to delete the You can see the notifications related code in > Did we decide on something like `DO_NOTIFY`?
Yes, we did. I was supposed to delete the `src/redux/actions/app.js` file. It's not used anywhere in `lbry-redux` at this point.
You can see the notifications related code in `src/redux/actions/notification.js`, `src/redux/reducers/notification.js` and `src/redux/selectors/notification.js`. We'll need to update `lbry-app` to make use of the new action, which will be the next step after the merge is completed.
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
Yes, we did. I was supposed to delete the You can see the notifications related code in > Did we decide on something like `DO_NOTIFY`?
Yes, we did. I was supposed to delete the `src/redux/actions/app.js` file. It's not used anywhere in `lbry-redux` at this point.
You can see the notifications related code in `src/redux/actions/notification.js`, `src/redux/reducers/notification.js` and `src/redux/selectors/notification.js`. We'll need to update `lbry-app` to make use of the new action, which will be the next step after the merge is completed.
|
|||||||
});
|
});
|
||||||
|
|
||||||
Lbry.wallet_new_address().then(address => {
|
Lbry.wallet_new_address().then(address => {
|
||||||
//localStorage.setItem('wallet_address', address);
|
// localStorage.setItem('wallet_address', address);
|
||||||
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
Yes, we did. I was supposed to delete the You can see the notifications related code in > Did we decide on something like `DO_NOTIFY`?
Yes, we did. I was supposed to delete the `src/redux/actions/app.js` file. It's not used anywhere in `lbry-redux` at this point.
You can see the notifications related code in `src/redux/actions/notification.js`, `src/redux/reducers/notification.js` and `src/redux/selectors/notification.js`. We'll need to update `lbry-app` to make use of the new action, which will be the next step after the merge is completed.
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
Yes, we did. I was supposed to delete the You can see the notifications related code in > Did we decide on something like `DO_NOTIFY`?
Yes, we did. I was supposed to delete the `src/redux/actions/app.js` file. It's not used anywhere in `lbry-redux` at this point.
You can see the notifications related code in `src/redux/actions/notification.js`, `src/redux/reducers/notification.js` and `src/redux/selectors/notification.js`. We'll need to update `lbry-app` to make use of the new action, which will be the next step after the merge is completed.
|
|||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.GET_NEW_ADDRESS_COMPLETED,
|
type: ACTIONS.GET_NEW_ADDRESS_COMPLETED,
|
||||||
data: { address },
|
data: { address },
|
||||||
|
|
||||||
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
Yes, we did. I was supposed to delete the You can see the notifications related code in > Did we decide on something like `DO_NOTIFY`?
Yes, we did. I was supposed to delete the `src/redux/actions/app.js` file. It's not used anywhere in `lbry-redux` at this point.
You can see the notifications related code in `src/redux/actions/notification.js`, `src/redux/reducers/notification.js` and `src/redux/selectors/notification.js`. We'll need to update `lbry-app` to make use of the new action, which will be the next step after the merge is completed.
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
Yes, we did. I was supposed to delete the You can see the notifications related code in > Did we decide on something like `DO_NOTIFY`?
Yes, we did. I was supposed to delete the `src/redux/actions/app.js` file. It's not used anywhere in `lbry-redux` at this point.
You can see the notifications related code in `src/redux/actions/notification.js`, `src/redux/reducers/notification.js` and `src/redux/selectors/notification.js`. We'll need to update `lbry-app` to make use of the new action, which will be the next step after the merge is completed.
|
|
@ -1,7 +1,7 @@
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
|
|
||||||
const reducers = {};
|
const reducers = {};
|
||||||
const receiveAddress = null;//localStorage.getItem('receiveAddress');
|
const receiveAddress = null; // localStorage.getItem('receiveAddress');
|
||||||
const buildDraftTransaction = () => ({
|
const buildDraftTransaction = () => ({
|
||||||
amount: undefined,
|
amount: undefined,
|
||||||
address: undefined,
|
address: undefined,
|
||||||
|
@ -46,7 +46,7 @@ reducers[ACTIONS.GET_NEW_ADDRESS_STARTED] = state =>
|
||||||
reducers[ACTIONS.GET_NEW_ADDRESS_COMPLETED] = (state, action) => {
|
reducers[ACTIONS.GET_NEW_ADDRESS_COMPLETED] = (state, action) => {
|
||||||
const { address } = action.data;
|
const { address } = action.data;
|
||||||
|
|
||||||
//localStorage.setItem('receiveAddress', address);
|
// localStorage.setItem('receiveAddress', address);
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
gettingNewAddress: false,
|
gettingNewAddress: false,
|
||||||
receiveAddress: address,
|
receiveAddress: address,
|
||||||
|
|
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12