@@ -40,6 +40,7 @@ import {
40import BridgeForm from 'form/BridgeForm';
40import BridgeForm from 'form/BridgeForm';
41import Condition from 'form/Condition';
41import Condition from 'form/Condition';
42import FormError from 'form/FormError';
42import FormError from 'form/FormError';
43+import convertToInt from 'lib/convertToInt';
44const chainKeyProp = name => d =>
45const chainKeyProp = name => d =>
45 d[name] === CURVE_ZERO_ADDR ? Nothing() : Just(d[name]);
46 d[name] === CURVE_ZERO_ADDR ? Nothing() : Just(d[name]);
@@ -64,7 +65,7 @@ function useSetKeys() {
64 const _contracts = need.contracts(contracts);
65 const _contracts = need.contracts(contracts);
65 const _details = need.details(getDetails(_point));
66 const _details = need.details(getDetails(_point));
67− const networkRevision = parseInt(_details.keyRevisionNumber, 10);
68+ const networkRevision = convertToInt(_details.keyRevisionNumber, 10);
68 const randomSeed = useRef();
69 const randomSeed = useRef();
70 // NOTE: nd = 'nondeterministic' (can also be a 'manual' seed)
71 // NOTE: nd = 'nondeterministic' (can also be a 'manual' seed)
@@ -151,6 +152,8 @@ export default function AdminNetworkingKeys() {
151 const hasKeys = details.matchWith({
152 const hasKeys = details.matchWith({
152 Nothing: () => false,
153 Nothing: () => false,
153 Just: ({ value: details }) => parseInt(details.keyRevisionNumber, 10) > 0,
154 Just: ({ value: details }) => parseInt(details.keyRevisionNumber, 10) > 0,
155+ // we actually don't mind the default NaN behavior of parseInt here,
156+ // since NaN > 0 === false and that's a reasonable result