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

update channel from orderer #524

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

selvaprakash92
Copy link
Contributor

Type of change

  • New feature

Description

Signed-off-by: Prakash P S <[email protected]>
@selvaprakash92 selvaprakash92 requested a review from a team as a code owner September 7, 2023 05:54
Prakash P S added 2 commits September 7, 2023 11:40
Signed-off-by: Prakash P S <[email protected]>
Signed-off-by: Prakash P S <[email protected]>
Copy link
Contributor

@dshuffma-ibm dshuffma-ibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@@ -106,6 +198,355 @@ class ChannelParticipationDetails extends Component {
});
};

getChannelDetails = cb => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • i don't want this code in two places, refactor this code so that ChannelDetails.js and ChannelParticipationDetails.js call 1 function that does the work in this block

@@ -185,6 +636,29 @@ class ChannelParticipationDetails extends Component {
widerTiles
/>)
}

{!this.props.loading && this.props.showEditChannelModal && (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when the pencil button is clicked, there is no obvious loading animation and the ChannelModal is still hidden, it will eventually appear and all is well, but this is confusing. change this to show the ChannelModal immediately, but pass it it's loading parameter, so that we know its doing something.

import React from 'react';
import SvgContainer from './SvgContainer';

const Pencil = ({ extendClass, height, title, width }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, cool, thanks for tracking down the pencil svg

let channel_details = await ChannelApi.getChannel(channel.name);
this.props.updateState(SCOPE, {
channelEdit: channel.name,
peerName: channel_details.peers[0].id,
Copy link
Contributor

@dshuffma-ibm dshuffma-ibm Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't work if we don't have peers, and this feature should still work even if we don't have any peers. we don't need a peer to load the edit channel modal, but you will need to do some work to get the config block from the alternate api.

so what i mean is ,we are currently calling getChannelConfig() in ChannelApi.js, which calls window.stitch.getChannelConfigFromPeer() from the stitch sdk, instead of that, you can call window.stitch.getChannelBlockFromOrderer(), but only use that function in this new flow. the old flow should still call the peer to get the config block.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants