fabric-operations-console icon indicating copy to clipboard operation
fabric-operations-console copied to clipboard

Console shows incorrect approval statuses for smart contract proposal

Open dkacperski97 opened this issue 4 years ago • 2 comments

Screenshot 2021-10-29 123041

The error occurs when the name and id of the organization differ in configtx.yaml, e.g.

...
Organizations:
    - &Org1
        Name: Org1
        ID: Org1MSP
...

The error does not occur with test-network because the id and name of the peer organization are the same.

The status value depends on this line of code: https://github.com/hyperledger-labs/fabric-operations-console/blob/f6230be047e44264e44808043db61b1588c3b89b/packages/apollo/src/components/ChaincodeModal/ChaincodeModal.js#L232 The keys in the commited object are the identifiers of organizations, but member.id is actually the name of the organization. Members are passed from the ChannelDetails component and are based on the part of the channel configuration where the names of organizations are used. https://github.com/hyperledger-labs/fabric-operations-console/blob/f6230be047e44264e44808043db61b1588c3b89b/packages/apollo/src/components/ChannelDetails/ChannelDetails.js#L229

dkacperski97 avatar Oct 29 '21 12:10 dkacperski97

@dkacperski97 good analysis! Yes, console currently expects both of of those to be the same... we can look to fix handle it for some of these cases where it makes sense... sounds like you may have gotten it to work by tweaking it? if so, please feel free to make a PR... otherwise we will take a look

varadgit avatar Oct 29 '21 18:10 varadgit

No, I haven't tried to fix it.

dkacperski97 avatar Oct 30 '21 00:10 dkacperski97