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

BE-406 | send channelhash to metadata api #412

Merged
merged 1 commit into from
Jul 4, 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
6 changes: 3 additions & 3 deletions client/src/components/Lists/Chaincodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export class Chaincodes extends Component {
};
}

handleDialogOpen = async tid => {
await this.props.getChaincodeMetaData(tid);
handleDialogOpen = async (channelhash,tid) => {
await this.props.getChaincodeMetaData(channelhash,tid);
this.setState({ dialogOpen: true });
};

Expand All @@ -80,7 +80,7 @@ export class Chaincodes extends Component {
<a
data-command="transaction-partial-hash"
className={classes.partialHash}
onClick={() => this.handleDialogOpen(row.value)}
onClick={() => this.handleDialogOpen(this.props.currentChannel,row.value)}
href="#/chaincodes"
>{row.value}
</a>
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ export const Main = props => {
const chaincodeViewProps = {
chaincodeList,
chaincodeMetaData,
getChaincodeMetaData
getChaincodeMetaData,
currentChannel
};

const channelsViewProps = {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/View/ChaincodeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import View from '../Styled/View';
import Chaincodes from '../Lists/Chaincodes';
import { chaincodeListType, chaincodeMetaDataType } from '../types';

export const ChaincodeView = ({ chaincodeList,chaincodeMetaData, getChaincodeMetaData }) => (
export const ChaincodeView = ({ chaincodeList,chaincodeMetaData, getChaincodeMetaData, currentChannel }) => (
<View>
<Chaincodes chaincodeList={chaincodeList} chaincodeMetaData={chaincodeMetaData} getChaincodeMetaData={getChaincodeMetaData} />
<Chaincodes chaincodeList={chaincodeList} chaincodeMetaData={chaincodeMetaData} getChaincodeMetaData={getChaincodeMetaData} currentChannel={currentChannel}/>
</View>
);

Expand Down
4 changes: 2 additions & 2 deletions client/src/state/redux/tables/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ const transactionList = (channel,params) => dispatch =>
console.error(error);
});

const chaincodeMetaData = (query) => dispatch =>
get(`/api/metadata/${query}`)
const chaincodeMetaData = (channel,query) => dispatch =>
get(`/api/metadata/${channel}/${query}`)
.then(resp => {
if (resp.status === 500) {
dispatch(
Expand Down