diff --git a/packages/ui/src/app/pages/Validators/ValidatorList.stories.tsx b/packages/ui/src/app/pages/Validators/ValidatorList.stories.tsx index 58a7bdb4cf..f1ed6b7582 100644 --- a/packages/ui/src/app/pages/Validators/ValidatorList.stories.tsx +++ b/packages/ui/src/app/pages/Validators/ValidatorList.stories.tsx @@ -153,20 +153,14 @@ export default { }, }, }, - queryNode: [ - { - query: GetMembersWithDetailsDocument, - resolver: ({ variables } = {}) => { - if (variables?.where) { - return { - loading: false, - data: { memberships: [member('alice'), member('bob'), member('charlie'), member('dave')] }, - } - } - return { loading: false, data: undefined } + gql: { + queries: [ + { + query: GetMembersWithDetailsDocument, + data: { memberships: [member('alice'), member('bob'), member('charlie'), member('dave')] }, }, - }, - ], + ], + }, } }, }, diff --git a/packages/ui/src/validators/hooks/useValidatorsList.tsx b/packages/ui/src/validators/hooks/useValidatorsList.tsx index b5c2420ebe..9bc85c1ae4 100644 --- a/packages/ui/src/validators/hooks/useValidatorsList.tsx +++ b/packages/ui/src/validators/hooks/useValidatorsList.tsx @@ -55,13 +55,9 @@ export const useValidatorsList = () => { } const getValidatorsInfo = (api: Api, validatorsWithMembership: ValidatorMembership[]) => { - return of(validatorsWithMembership).pipe( - switchMap((validatorsWithMembership) => { - const validatorAddresses = validatorsWithMembership.map(({ stashAccount }) => stashAccount) - const validatorInfoObservables = validatorAddresses.map((address) => getValidatorInfo(address, api)) - return combineLatest(validatorInfoObservables) - }) - ) + const validatorAddresses = validatorsWithMembership.map(({ stashAccount }) => stashAccount) + const validatorInfoObservables = validatorAddresses.map((address) => getValidatorInfo(address, api)) + return combineLatest(validatorInfoObservables) } const allValidators = useFirstObservableValue(