Skip to content

Commit 0f73828

Browse files
Rename selectMappedOperatorsAndAdditionalData
Additional Data doesn't really say anything about what's that data and what it contains so I've decided to remove that subpart from the selector's name. `selectMappedOperatorsAndAdditionalData` -> `selectMappedOperators`
1 parent d063aeb commit 0f73828

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/components/Modal/MapOperatorToStakingProviderModal/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
isSameETHAddress,
3131
AddressZero,
3232
} from "../../../web3/utils"
33-
import { selectMappedOperatorsAndAdditionalData } from "../../../store/account/selectors"
33+
import { selectMappedOperators } from "../../../store/account/selectors"
3434
import { useAppSelector } from "../../../hooks/store"
3535

3636
export interface MapOperatorToStakingProviderModalProps {
@@ -52,7 +52,7 @@ const MapOperatorToStakingProviderModal: FC<
5252
mappedOperatorRandomBeacon,
5353
isOperatorMappedOnlyInRandomBeacon,
5454
isOperatorMappedOnlyInTbtc,
55-
} = useAppSelector(selectMappedOperatorsAndAdditionalData)
55+
} = useAppSelector(selectMappedOperators)
5656

5757
const onSubmit = async ({
5858
operator,

src/hooks/staking-applications/useRegisterMultipleOperatorsTransaction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { useWeb3React } from "@web3-react/core"
77
import { OperatorMappedSuccessTx } from "../../components/Modal/MapOperatorToStakingProviderSuccessModal"
88
import { mapOperatorToStakingProviderModalClosed } from "../../store/modal"
99
import { useAppDispatch, useAppSelector } from "../store"
10-
import { selectMappedOperatorsAndAdditionalData } from "../../store/account"
10+
import { selectMappedOperators } from "../../store/account"
1111

1212
export const useRegisterMultipleOperatorsTransaction = () => {
1313
const {
@@ -16,7 +16,7 @@ export const useRegisterMultipleOperatorsTransaction = () => {
1616
isOperatorMappedInBothApps,
1717
isOperatorMappedOnlyInRandomBeacon,
1818
isOperatorMappedOnlyInTbtc,
19-
} = useAppSelector((state) => selectMappedOperatorsAndAdditionalData(state))
19+
} = useAppSelector((state) => selectMappedOperators(state))
2020
const { account } = useWeb3React()
2121
const { openModal, closeModal } = useModal()
2222
const dispatch = useAppDispatch()

src/pages/Staking/OperatorAddressMappingCard.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ import { FC } from "react"
1212
import { ModalType } from "../../enums"
1313
import { useAppSelector } from "../../hooks/store"
1414
import { useModal } from "../../hooks/useModal"
15-
import { selectMappedOperatorsAndAdditionalData } from "../../store/account/selectors"
15+
import { selectMappedOperators } from "../../store/account/selectors"
1616

1717
const OperatorAddressMappingCard: FC = () => {
1818
const { openModal } = useModal()
1919

20-
const { isOneOfTheAppsNotMapped } = useAppSelector(
21-
selectMappedOperatorsAndAdditionalData
22-
)
20+
const { isOneOfTheAppsNotMapped } = useAppSelector(selectMappedOperators)
2321

2422
const onStartMappingClick = () => {
2523
openModal(ModalType.MapOperatorToStakingProvider)

src/store/account/selectors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { AccountState } from "./slice"
55

66
export const selectAccountState = (state: RootState) => state.account
77

8-
export const selectMappedOperatorsAndAdditionalData = createSelector(
8+
export const selectMappedOperators = createSelector(
99
[selectAccountState],
1010
(accountState: AccountState) => {
1111
const { randomBeacon, tbtc } = accountState.operatorMapping.data

0 commit comments

Comments
 (0)