Changed THRESHOLD in useBlockTime so chains that uses values smaller than 1s for the MinimumPeriod (pallet_timestamp) parameter are displayed correctly (#6045)

This commit is contained in:
fixxxedpoint 2021-09-01 13:25:35 +02:00 committed by GitHub
parent 0c5b471d9d
commit 8ef4ed18dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ const DEFAULT_TIME = new BN(6_000);
// Some chains incorrectly use these, i.e. it is se to values such as 0 or even 2
// Use a low minimum validity threshold to check these against
const THRESHOLD = BN_THOUSAND;
const THRESHOLD = BN_THOUSAND.div(BN_TWO);
export function useBlockTime (blocks: number | BN = BN_ONE, apiOverride?: ApiPromise | null): Result {
const { t } = useTranslation();