Skip to content

Commit

Permalink
chore: add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Jan 21, 2024
1 parent 9e44fc0 commit 5ef8d79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rtk/features/activeStaking/topUsersSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,16 @@ export async function fetchTopUsersWithSpaces(
dispatch: AppDispatch,
api: SubsocialApi,
) {
console.log('fetching top users...')
await dispatch(fetchTopUsers({ reload: true }))
const state = selectTopUsers(store.getState())
console.log('dont have state?', !state)
if (!state) return

const parsedState = state as TopUsers
const creators = parsedState.creators.map(user => user.address)
const stakers = parsedState.stakers.map(user => user.address)
console.log('fetching profiles', [...creators, ...stakers])

await dispatch(fetchProfileSpaces({ ids: [...creators, ...stakers], api }))
}
Expand Down

0 comments on commit 5ef8d79

Please sign in to comment.