-
Notifications
You must be signed in to change notification settings - Fork 63
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
base: main
Are you sure you want to change the base?
update channel from orderer #524
Conversation
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
Signed-off-by: Prakash P S <prakashps@Prakashs-MacBook-Pro.local>
There was a problem hiding this 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 => { |
There was a problem hiding this comment.
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
andChannelParticipationDetails.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 && ( |
There was a problem hiding this comment.
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 }) => { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check out stitch's readme for details on usage: https://github.com/hyperledger-labs/fabric-operations-console/tree/main/packages/stitch/docs#getChannelConfigBlockFromOrderer
Type of change
Description