Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! feat(suite-common): fetch stake data based on device account s…
Browse files Browse the repository at this point in the history
…ymbols
vytick committed Nov 19, 2024
1 parent 022d1ec commit a108320
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions suite-common/wallet-core/src/stake/stakeThunks.ts
Original file line number Diff line number Diff line change
@@ -60,9 +60,12 @@ export const fetchEverstakeData = createThunk<

export const initStakeDataThunk = createThunk(
`${STAKE_MODULE}/initStakeDataThunk`,
(_, { getState, dispatch }) => {
(_, { getState, dispatch, extra }) => {
//because fetch only happens every 5 minutes we fetch according all devices in case a device is changed within those 5 minutes
const networks = selectAllNetworkSymbolsOfVisibleAccounts(getState());
const accountsNetworks = selectAllNetworkSymbolsOfVisibleAccounts(getState());
//also join with enabled networks in case account was not yet discovered, but network is already enabled
const enabledNetworks = extra.selectors.selectEnabledNetworks(getState());
const networks = [...new Set([...accountsNetworks, ...enabledNetworks])];

const networksWithStaking = getStakingSymbols(networks);

0 comments on commit a108320

Please sign in to comment.