Skip to content

Commit ae783c8

Browse files
committed
refactor: extract FAR_FUTURE_EPOCH, use hex string
1 parent d90f261 commit ae783c8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/utils/envVars.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,6 @@ if(process.env.REACT_APP_MAX_QUERY_LIMIT && Number.isNaN(Number(process.env.REAC
107107
}
108108
export const MAX_QUERY_LIMIT = Number(process.env.REACT_APP_MAX_QUERY_LIMIT) || 100;
109109

110-
export const EXCESS_INHIBITOR = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
110+
export const EXCESS_INHIBITOR = "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
111+
112+
export const FAR_FUTURE_EPOCH = "0x010000000000000000" // 18446744073709551615

src/utils/validators.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import { ValidatorType } from '../pages/Actions/types';
33
import { BeaconChainValidator } from '../pages/TopUp/types';
44
import {
55
ETHER_TO_GWEI,
6+
FAR_FUTURE_EPOCH,
67
MAX_EFFECTIVE_BALANCE,
78
MIN_ACTIVATION_BALANCE,
89
} from './envVars';
910

10-
const FAR_FUTURE_EPOCH = new BigNumber(2).pow(63).minus(1); // 63-bit 1-filled
11-
1211
export const hasExitEpochBeenSet = (exitEpoch: BigNumber | number) =>
1312
new BigNumber(exitEpoch).isLessThan(FAR_FUTURE_EPOCH);
1413

0 commit comments

Comments
 (0)