Merge pull request #296 from lbryio/claim-search

add claim search query to claimSearchByQuery when the result times out
This commit is contained in:
Sean Yesmunt 2020-03-31 12:00:46 -04:00 committed by GitHub
commit b7ae238606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

9
dist/bundle.es.js vendored
View file

@ -4951,11 +4951,16 @@ reducers[CLAIM_SEARCH_COMPLETED] = (state, action) => {
};
reducers[CLAIM_SEARCH_FAILED] = (state, action) => {
const { query } = action.data;
const claimSearchByQuery = Object.assign({}, state.claimSearchByQuery);
const fetchingClaimSearchByQuery = Object.assign({}, state.fetchingClaimSearchByQuery);
delete fetchingClaimSearchByQuery[action.data.query];
delete fetchingClaimSearchByQuery[query];
claimSearchByQuery[query] = null;
return Object.assign({}, state, {
fetchingClaimSearchByQuery
fetchingClaimSearchByQuery,
claimSearchByQuery
});
};

View file

@ -457,11 +457,16 @@ reducers[ACTIONS.CLAIM_SEARCH_COMPLETED] = (state: State, action: any): State =>
};
reducers[ACTIONS.CLAIM_SEARCH_FAILED] = (state: State, action: any): State => {
const { query } = action.data;
const claimSearchByQuery = Object.assign({}, state.claimSearchByQuery);
const fetchingClaimSearchByQuery = Object.assign({}, state.fetchingClaimSearchByQuery);
delete fetchingClaimSearchByQuery[action.data.query];
delete fetchingClaimSearchByQuery[query];
claimSearchByQuery[query] = null;
return Object.assign({}, state, {
fetchingClaimSearchByQuery,
claimSearchByQuery,
});
};