diff --git a/packages/apollo/src/assets/i18n/en/messages.json b/packages/apollo/src/assets/i18n/en/messages.json index c9c6eeae..4e7c4cd8 100644 --- a/packages/apollo/src/assets/i18n/en/messages.json +++ b/packages/apollo/src/assets/i18n/en/messages.json @@ -1446,6 +1446,7 @@ "peer_breaking_upgrade_title": "Breaking upgrade", "peer_breaking_title": "Version Warning", "peer_breaking_upgrade": "The selected peer version is not always compatible with Node.js v8 chaincode (which was often used by Fabric 1.4). You should first upgrade to a peer that is compatible (such as v2.2.10). After updating your peer, update any node chaincode to be compatible with Node.js v16. Then you may upgrade your peer to the selected version.", + "peer_breaking_upgrade_2": "The selected peer version is not compatible with Node.js v8 chaincode. You should first update all node chaincode to be compatible with Node.js v16. Then you may upgrade your peer to the selected version.", "peer_breaking": "The selected peer version is not always compatible with Node.js v8 chaincode (which was often used by Fabric 1.4). It's recommended to use a version that is compatible (such as v2.2.10). This warning can be ignored if all node chaincode is compatible with Node.js v16.", "breaking_link_text": "Fabric documentation details", "ignore_breaking_txt": "I understand this is a potentially breaking change. Upgrade anyway.", diff --git a/packages/apollo/src/components/PeerModal/PeerModal.js b/packages/apollo/src/components/PeerModal/PeerModal.js index 9ebb56b5..83caa285 100644 --- a/packages/apollo/src/components/PeerModal/PeerModal.js +++ b/packages/apollo/src/components/PeerModal/PeerModal.js @@ -494,8 +494,12 @@ class PeerModal extends React.Component { if (e && e.msgs && e.msgs[0] && e.msgs[0].includes('Invalid \'version\' value')) { breaking_upgrade = true; breaking_details = (e && e.msgs) ? e.msgs[0] : ''; - if (breaking_details.includes('potentially breaking update')) { // use a better error message + if (breaking_details.includes('Upgrading Fabric from \'2.2')) { + breaking_msg = 'peer_breaking_upgrade_2'; + } else if (breaking_details.includes('Upgrading Fabric from \'1.4')) { // use a better error message breaking_msg = 'peer_breaking_upgrade'; + } else if (breaking_details.includes('Upgrading Fabric from \'2.4')) { // use a better error message + breaking_upgrade = false; } else { breaking_details = removeLastSentence(breaking_details); }