Prettier fixes

This commit is contained in:
6ea86b96 2017-06-11 00:17:37 +07:00
parent bfa9f6581f
commit 03f0c3ae8f
4 changed files with 21 additions and 27 deletions

View file

@ -12,7 +12,7 @@ export function doFetchCostInfoForUri(uri) {
claim = selectClaimsByUri(state)[uri],
isGenerous = selectSettingsIsGenerous(state);
if (!claim) return null
if (!claim) return null;
function begin() {
dispatch({

View file

@ -1,23 +1,19 @@
import React from 'react'
import {
connect
} from 'react-redux'
import {
doUserEmailNew
} from 'actions/user'
import React from "react";
import { connect } from "react-redux";
import { doUserEmailNew } from "actions/user";
import {
selectEmailNewIsPending,
selectEmailNewErrorMessage,
} from 'selectors/user'
import UserEmailNew from './view'
} from "selectors/user";
import UserEmailNew from "./view";
const select = (state) => ({
const select = state => ({
isPending: selectEmailNewIsPending(state),
errorMessage: selectEmailNewErrorMessage(state),
})
});
const perform = (dispatch) => ({
addUserEmail: (email) => dispatch(doUserEmailNew(email))
})
const perform = dispatch => ({
addUserEmail: email => dispatch(doUserEmailNew(email)),
});
export default connect(select, perform)(UserEmailNew)
export default connect(select, perform)(UserEmailNew);

View file

@ -22,9 +22,9 @@ reducers[types.RESOLVE_URI_COMPLETED] = function(state, action) {
return Object.assign({}, state, {
byId,
claimsByUri: byUri
claimsByUri: byUri,
});
}
};
reducers[types.RESOLVE_URI_CANCELED] = function(state, action) {
const uri = action.data.uri;
@ -42,9 +42,7 @@ reducers[types.FETCH_CLAIM_LIST_MINE_STARTED] = function(state, action) {
};
reducers[types.FETCH_CLAIM_LIST_MINE_COMPLETED] = function(state, action) {
const {
claims,
} = action.data;
const { claims } = action.data;
const myClaims = new Set(state.myClaims);
const byUri = Object.assign({}, state.claimsByUri);
const byId = Object.assign({}, state.byId);
@ -52,14 +50,14 @@ reducers[types.FETCH_CLAIM_LIST_MINE_COMPLETED] = function(state, action) {
claims.forEach(claim => {
myClaims.add(claim.claim_id);
byId[claim.claim_id] = claim;
})
});
return Object.assign({}, state, {
isClaimListMinePending: false,
myClaims: myClaims,
byId,
});
}
};
// reducers[types.FETCH_CHANNEL_CLAIMS_STARTED] = function(state, action) {
// const {

View file

@ -5,7 +5,7 @@ const _selectState = state => state.claims || {};
export const selectClaimsById = createSelector(
_selectState,
(state) => state.byId || {}
state => state.byId || {}
);
export const selectClaimsByUri = createSelector(
@ -28,11 +28,11 @@ export const selectClaimsByUri = createSelector(
claims[uri] = claim;
}
})
});
return claims;
}
)
);
export const selectAllClaimsByChannel = createSelector(
_selectState,
@ -107,7 +107,7 @@ export const selectMyClaimsOutpoints = createSelector(
claimIds.forEach(claimId => {
const claim = byId[claimId];
if (claim) outpoints.push(`${claim.txid}:${claim.nout}`);
})
});
return outpoints;
}