Skip to content

Commit

Permalink
chore: tidy ups
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat committed Oct 22, 2023
1 parent 1e0fe00 commit 66ab415
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const FallbackEpochDuration = new BigNumber(2400);
/*
* Misc values
*/
export const ListItemsPerPage = 50;
export const ListItemsPerPage = 30;
export const ListItemsPerBatch = 30;
export const MinBondPrecision = 3;
export const MaxPayoutDays = 60;
Expand Down
2 changes: 1 addition & 1 deletion src/contexts/Validators/ValidatorEntries/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { EraPointsBoundaries, ValidatorsContextInterface } from '../types';

export const defaultValidatorsContext: ValidatorsContextInterface = {
fetchValidatorPrefs: async (a) => new Promise((resolve) => resolve(null)),
getValidatorEraPoints: (startEra, address) => ({}),
getValidatorPointsFromEras: (startEra, address) => ({}),
getNominated: (bondFor) => [],
injectValidatorListData: (entries) => [],
validators: [],
Expand Down
4 changes: 2 additions & 2 deletions src/contexts/Validators/ValidatorEntries/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export const ValidatorsProvider = ({
};

// Gets era points for a validator
const getValidatorEraPoints = (startEra: BigNumber, address: string) => {
const getValidatorPointsFromEras = (startEra: BigNumber, address: string) => {
startEra = BigNumber.max(startEra, 1);

// minus 1 from `MaxRewardPointsEras` to account for the current era.
Expand Down Expand Up @@ -573,7 +573,7 @@ export const ValidatorsProvider = ({
<ValidatorsContext.Provider
value={{
fetchValidatorPrefs,
getValidatorEraPoints,
getValidatorPointsFromEras,
getNominated,
injectValidatorListData,
validators,
Expand Down
2 changes: 1 addition & 1 deletion src/contexts/Validators/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { AnyJson, BondFor, Sync } from 'types';

export interface ValidatorsContextInterface {
fetchValidatorPrefs: (a: ValidatorAddresses) => Promise<Validator[] | null>;
getValidatorEraPoints: (
getValidatorPointsFromEras: (
startEra: BigNumber,
address: string
) => Record<string, BigNumber>;
Expand Down
2 changes: 1 addition & 1 deletion src/library/List/MotionContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from 'react';

export const MotionContainer = ({
children,
staggerChildren = 0.01,
staggerChildren = 0.015,
}: {
staggerChildren?: number;
children: React.ReactNode;
Expand Down
4 changes: 2 additions & 2 deletions src/library/ListItem/Wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const Wrapper = styled.div`
--height-top-row: 3.25rem;
--height-bottom-row: 5rem;
/* Pool lists do not currently have larger bottom row. */
&.pool {
&.pool,
&.member {
--height-bottom-row: 2.75rem;
}
Expand Down
4 changes: 2 additions & 2 deletions src/library/ValidatorList/ValidatorItem/Pulse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export const Pulse = ({ address, displayFor }: PulseProps) => {
const { isReady } = useApi();
const { activeEra } = useNetworkMetrics();
const { setTooltipTextAndOpen } = useTooltip();
const { getValidatorEraPoints, eraPointsBoundaries, erasRewardPoints } =
const { getValidatorPointsFromEras, eraPointsBoundaries, erasRewardPoints } =
useValidators();
const startEra = activeEra.index.minus(1);
const eraRewardPoints = getValidatorEraPoints(startEra, address);
const eraRewardPoints = getValidatorPointsFromEras(startEra, address);

const high = eraPointsBoundaries?.high || new BigNumber(1);
const normalisedPoints = normaliseEraPoints(eraRewardPoints, high);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Pools/Home/MembersList/Member.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const Member = ({ who, batchKey, batchIndex }: any) => {
};

return (
<Wrapper className="pool">
<Wrapper className="member">
<div className="inner">
<MenuPosition ref={posRef} />
<div className="row top">
Expand Down

0 comments on commit 66ab415

Please sign in to comment.