on master help sign in
Warn about unset netkeys when setting up pools
commit51b8d875e256727c94ae720dbd3110ad6ef15248 authorFang <git@fang.io> dateSat 7 Dec 2019, 01:02 (7 years ago) parentf697a82
1 file changed+18−1
src/views/Party/PartySetPoolSize.js+18−1
src/views/Party/PartySetPoolSize.js+18−1
@@ -13,6 +13,7 @@ import { GAS_LIMITS } from 'lib/constants';
1313import { useLocalRouter } from 'lib/LocalRouter';
1414import useCurrentPermissions from 'lib/useCurrentPermissions';
1515import patp2dec from 'lib/patp2dec';
16+import convertToInt from 'lib/convertToInt';
1617
1718import ViewHeader from 'components/ViewHeader';
1819import InlineEthereumTransaction from 'components/InlineEthereumTransaction';
@@ -56,6 +57,15 @@ function useSetPoolSize() {
5657export default function PartySetPoolSize() {
5758 const { pop } = useLocalRouter();
5859 const { contracts } = useNetwork();
60+ const { pointCursor } = usePointCursor();
61+ const { getDetails } = usePointCache();
62+
63+ const _point = need.point(pointCursor);
64+ const _details = need.details(getDetails(_point));
65+ const hasKeysSet =
66+ 0 !== convertToInt(_details.encryptionKey, 16) &&
67+ 0 !== convertToInt(_details.authenticationKey, 16) &&
68+ 0 !== _details.cryptoSuiteVersion;
5969
6070 const _contracts = need.contracts(contracts);
6171
@@ -104,7 +114,14 @@ export default function PartySetPoolSize() {
104114 <CopiableAddress>
105115 {_contracts.delegatedSending.address}
106116 </CopiableAddress>{' '}
107− for invitations to be available.
117+ for invitations to be available for use.
118+ </Grid.Item>
119+ )}
120+
121+ {!hasKeysSet && (
122+ <Grid.Item full as={WarningBox} className="mb4 f6">
123+ Networking keys must be configured for invitations to be available
124+ for use.
108125 </Grid.Item>
109126 )}
110127