Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugFixes for the release #398

Merged
merged 1 commit into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/passport/local-login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const localLoginStrategy = function(platform) {
network: reqUser.network
};

const token = await jwtSignAsync(payload, config.jwt.secret, {
const token: any = await jwtSignAsync(payload, config.jwt.secret, {
expiresIn: config.jwt.expiresIn
});
const data = {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Lists/Chaincodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class Chaincodes extends Component {
defaultPageSize={5}
filterable
minRows={0}
showPagination={chaincodeList.length >= 5}
showPagination={chaincodeList?.length >= 5}
/>
<Dialog
open={dialogOpen}
Expand Down
23 changes: 11 additions & 12 deletions client/src/components/Lists/Transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ export class Transactions extends Component {
getTransaction('ChannelNotSpecified', this.props.transactionId);
this.setState({ directLinkSearchResultsFlag: true });
}
const { transactionList } = this.props;
// const { transactionList } = this.props;
const selection = {};
transactionList.forEach(element => {
selection[element.blocknum] = false;
});
// transactionList.forEach(element => {
// selection[element.blocknum] = false;
// });
const opts = [];
this.props.transactionByOrg.forEach(val => {
opts.push({ label: val.creator_msp_id, value: val.creator_msp_id });
Expand All @@ -139,22 +139,21 @@ export class Transactions extends Component {
this.handleSearch();
}

componentWillReceiveProps(nextProps) {
componentDidUpdate(prevProps,prevState) {
if (
this.state.search &&
nextProps.currentChannel !== this.props.currentChannel
this.props.currentChannel !== prevProps.currentChannel
) {
if (this.interval !== undefined) {
clearInterval(this.interval);
}
this.interval = setInterval(() => {
this.searchTransactionList(nextProps.currentChannel);
this.searchTransactionList(this.props.currentChannel);
}, 60000);
this.searchTransactionList(nextProps.currentChannel);
this.searchTransactionList(this.props.currentChannel);
}
}
componentDidUpdate(prevProps,prevState) {
if(prevState.page!=this.state.page || prevState.rowsPerPage!=this.state.rowsPerPage || this.state.searchClick){
this.setState({ searchClick: false });
this.handleSearch();
}
}
Expand Down Expand Up @@ -226,7 +225,7 @@ export class Transactions extends Component {
this.searchTransactionList();
}, 60000);
await this.searchTransactionList();
this.setState({ search: true, searchClick: false });
this.setState({ search: true });
if (this.props.transactionId) {
this.setState({ directLinkSearchResultsFlag: false });
const { getTransaction } = this.props;
Expand Down Expand Up @@ -436,7 +435,7 @@ export class Transactions extends Component {
className={classes.searchButton}
color="success"
disabled={this.state.err || (!this.state.from != !this.state.to)}
onClick={async () => {
onClick={() => {
this.setState({page:0, searchClick:true, queryFlag: true, defaultQuery: false })
}}
>
Expand Down
1 change: 1 addition & 0 deletions client/src/state/redux/tables/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const chaincodeList = channel => dispatch =>
);
} else if (resp.status === 400) {
dispatch(actions.getErroMessage(resp.error));
} else {
dispatch(actions.getChaincodeList(resp));
}
})
Expand Down
1 change: 1 addition & 0 deletions client/src/state/redux/tables/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const chaincodeMetaDataSelector = state =>state.tables.chaincodeMetaData.
export const transactionSelector = state => state.tables.transaction.transaction;
export const transactionListSelector = state => state.tables.transactionList.rows;
export const transactionListSearchSelector = state => state.tables.transactionListSearch.rows;
export const transactionListTotalPagesSelector = state =>state.tables.transactionList.noOfpages;
export const transactionListSearchTotalPagesSelector = state => state.tables.transactionListSearch.noOfpages;
export const transactionListSearchPageParamSelector = state => state.tables.transactionListSearch.pageParams;
export const transactionListSearchQuerySelector = state => state.tables.transactionListSearch.query;
Expand Down