Skip to content

Commit

Permalink
fixup! feat(suite-native): token definitions redux logic
Browse files Browse the repository at this point in the history
  • Loading branch information
PeKne committed Feb 26, 2024
1 parent 8aa4859 commit a017a0f
Showing 1 changed file with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,20 @@ export const tokenDefinitionsMiddleware = createMiddleware(
if (isEthereumBasedNetwork(network)) {
const { chainId } = network;
tokens?.forEach(token => {
dispatch(
getTokenDefinitionThunk({
networkSymbol: symbol,
contractAddress: token.contract,
chainId,
}),
const shouldFetchTokenDefinition = selectShouldFetchTokenDefinition(
getState(),
symbol,
token.contract,
);

if (shouldFetchTokenDefinition)
dispatch(
getTokenDefinitionThunk({
networkSymbol: symbol,
contractAddress: token.contract,
chainId,
}),
);
});
}
}
Expand Down

0 comments on commit a017a0f

Please sign in to comment.