Common components refactor #1

Merged
akinwale merged 42 commits from common-components-refactor into master 2018-04-05 04:57:30 +02:00
3 changed files with 5 additions and 5 deletions
Showing only changes of commit d42625dc91 - Show all commits

View file

@ -14,13 +14,13 @@ function apiCall(method, params, resolve, reject) {
}
function getLocal(key, fallback = undefined) {
//const itemRaw = localStorage.getItem(key);
// const itemRaw = localStorage.getItem(key);
const itemRaw = null;
return itemRaw === null ? fallback : JSON.parse(itemRaw);
}
function setLocal(key, value) {
//localStorage.setItem(key, JSON.stringify(value));
// localStorage.setItem(key, JSON.stringify(value));
}
/**

View file

@ -63,7 +63,7 @@ export function doGetNewAddress() {
neb-b commented 2018-03-30 00:57:41 +02:00 (Migrated from github.com)
Review
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
akinwale commented 2018-04-04 09:30:45 +02:00 (Migrated from github.com)
Review

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.

> 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.
neb-b commented 2018-03-30 00:57:41 +02:00 (Migrated from github.com)
Review
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
akinwale commented 2018-04-04 09:30:45 +02:00 (Migrated from github.com)
Review

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.

> 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 => {
//localStorage.setItem('wallet_address', address);
neb-b commented 2018-03-30 00:57:41 +02:00 (Migrated from github.com)
Review
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
akinwale commented 2018-04-04 09:30:45 +02:00 (Migrated from github.com)
Review

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.

> 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.
// localStorage.setItem('wallet_address', address);
neb-b commented 2018-03-30 00:57:41 +02:00 (Migrated from github.com)
Review
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
akinwale commented 2018-04-04 09:30:45 +02:00 (Migrated from github.com)
Review

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.

> 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({
type: ACTIONS.GET_NEW_ADDRESS_COMPLETED,
data: { address },

neb-b commented 2018-03-30 00:57:41 +02:00 (Migrated from github.com)
Review
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
akinwale commented 2018-04-04 09:30:45 +02:00 (Migrated from github.com)
Review

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.

> 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.
neb-b commented 2018-03-30 00:57:41 +02:00 (Migrated from github.com)
Review
https://github.com/lbryio/lbry-app/blob/master/src/renderer/redux/actions/wallet.js#L12
akinwale commented 2018-04-04 09:30:45 +02:00 (Migrated from github.com)
Review

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.

> 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.

View file

@ -1,7 +1,7 @@
import * as ACTIONS from 'constants/action_types';
const reducers = {};
const receiveAddress = null;//localStorage.getItem('receiveAddress');
const receiveAddress = null; // localStorage.getItem('receiveAddress');
const buildDraftTransaction = () => ({
amount: undefined,
address: undefined,
@ -46,7 +46,7 @@ reducers[ACTIONS.GET_NEW_ADDRESS_STARTED] = state =>
reducers[ACTIONS.GET_NEW_ADDRESS_COMPLETED] = (state, action) => {
const { address } = action.data;
//localStorage.setItem('receiveAddress', address);
// localStorage.setItem('receiveAddress', address);
return Object.assign({}, state, {
gettingNewAddress: false,
receiveAddress: address,