Skip to content

Commit

Permalink
feat: add to <AppContext />'s useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Oct 9, 2023
1 parent 4719c64 commit 9a0c88d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/context/AppProvider/AppContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { AccountId, AssetId, ChainId } from '@shapeshiftoss/caip'
import {
avalancheChainId,
bchChainId,
bscChainId,
btcChainId,
cosmosChainId,
dogeChainId,
Expand Down Expand Up @@ -213,6 +214,13 @@ export const AppProvider = ({ children }: { children: React.ReactNode }) => {
case dogeChainId:
case bchChainId:
case cosmosChainId:
case bscChainId:
;(async () => {
await fetchAllOpportunitiesIdsByChainId(chainId)
await fetchAllOpportunitiesMetadataByChainId(chainId)
await fetchAllOpportunitiesUserDataByAccountId(accountId)
})()
break
case avalancheChainId:
;(async () => {
await fetchAllOpportunitiesIdsByChainId(chainId)
Expand Down

0 comments on commit 9a0c88d

Please sign in to comment.