Skip to content

Commit

Permalink
Merge branch 'master' into am9u/ch1316/dapp-detailed-transactions-pro…
Browse files Browse the repository at this point in the history
…gress-modal
  • Loading branch information
am9u committed Jun 29, 2018
2 parents db07baf + d040695 commit 9c37929
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion packages/dapp/src/components/listing/Listing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ class ListingPage extends React.Component<ListingReduxProps & DispatchProp<any>
}

const mapToStateToProps = (state: State, ownProps: ListingPageProps): ListingReduxProps => {
const { newsrooms, listings, listingsFetching, user, parameters, govtParameters } = state.networkDependent;
const { newsrooms } = state;
const { listings, listingsFetching, user, parameters, govtParameters } = state.networkDependent;
const listingAddress = ownProps.match.params.listing;

let listingDataRequestStatus;
Expand Down
3 changes: 2 additions & 1 deletion packages/dapp/src/components/listinglist/ListingListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ const mapStateToProps = (
state: State,
ownProps: ListingListItemOwnProps,
): ListingListItemReduxProps & ListingListItemOwnProps => {
const { newsrooms, listings, challenges, challengeUserData, appealChallengeUserData, user } = state.networkDependent;
const { newsrooms } = state;
const { listings, challenges, challengeUserData, appealChallengeUserData, user } = state.networkDependent;

let listingAddress = ownProps.listingAddress;
let challenge;
Expand Down
12 changes: 6 additions & 6 deletions packages/dapp/src/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ export interface State {
networkDependent: NetworkDependentState;
network: string;
ui: Map<string, any>;
}

export interface NetworkDependentState {
newsrooms: Map<string, NewsroomState>;
newsroomUi: Map<string, any>;
newsroomUsers: Map<EthAddress, string>;
}

export interface NetworkDependentState {
currentUserNewsrooms: Set<string>;
listings: Map<string, ListingWrapperWithExpiry>;
listingsFetching: Map<string, any>;
Expand Down Expand Up @@ -89,9 +89,6 @@ export interface NetworkDependentState {
}

const networkDependentReducers = combineReducers({
newsrooms,
newsroomUi,
newsroomUsers,
currentUserNewsrooms,
listings,
listingsFetching,
Expand Down Expand Up @@ -134,6 +131,9 @@ const networkDependent = (state: any, action: AnyAction) => {
};

export default combineReducers({
newsrooms, // have to be top level because come from a package
newsroomUi,
newsroomUsers,
networkDependent,
network,
ui,
Expand Down

0 comments on commit 9c37929

Please sign in to comment.