Common components refactor #1
1 changed files with 3 additions and 4 deletions
|
@ -4277,8 +4277,8 @@ function doGetNewAddress() {
|
||||||
type: ACTIONS.GET_NEW_ADDRESS_STARTED
|
type: ACTIONS.GET_NEW_ADDRESS_STARTED
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Removed localStorage use, since address is expected to be stored in redux store
|
||||||
_lbry2.default.wallet_new_address().then(function (address) {
|
_lbry2.default.wallet_new_address().then(function (address) {
|
||||||
// localStorage.setItem('wallet_address', address);
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.GET_NEW_ADDRESS_COMPLETED,
|
type: ACTIONS.GET_NEW_ADDRESS_COMPLETED,
|
||||||
data: { address: address }
|
data: { address: address }
|
||||||
|
@ -5204,7 +5204,6 @@ var ACTIONS = _interopRequireWildcard(_action_types);
|
||||||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
||||||
|
|
||||||
var reducers = {};
|
var reducers = {};
|
||||||
var receiveAddress = null; // localStorage.getItem('receiveAddress');
|
|
||||||
var buildDraftTransaction = function buildDraftTransaction() {
|
var buildDraftTransaction = function buildDraftTransaction() {
|
||||||
return {
|
return {
|
||||||
amount: undefined,
|
amount: undefined,
|
||||||
|
@ -5217,7 +5216,7 @@ var defaultState = {
|
||||||
blocks: {},
|
blocks: {},
|
||||||
transactions: {},
|
transactions: {},
|
||||||
fetchingTransactions: false,
|
fetchingTransactions: false,
|
||||||
receiveAddress: receiveAddress,
|
receiveAddress: null,
|
||||||
gettingNewAddress: false,
|
gettingNewAddress: false,
|
||||||
draftTransaction: buildDraftTransaction(),
|
draftTransaction: buildDraftTransaction(),
|
||||||
sendingSupport: false
|
sendingSupport: false
|
||||||
|
@ -5254,7 +5253,7 @@ reducers[ACTIONS.GET_NEW_ADDRESS_STARTED] = function (state) {
|
||||||
reducers[ACTIONS.GET_NEW_ADDRESS_COMPLETED] = function (state, action) {
|
reducers[ACTIONS.GET_NEW_ADDRESS_COMPLETED] = function (state, action) {
|
||||||
var address = action.data.address;
|
var address = action.data.address;
|
||||||
|
|
||||||
// localStorage.setItem('receiveAddress', address);
|
// Say no to localStorage!
|
||||||
|
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
gettingNewAddress: false,
|
gettingNewAddress: false,
|
||||||
|
|
Loading…
Reference in a new issue