Skip to content

Commit

Permalink
asset summary stale time
Browse files Browse the repository at this point in the history
  • Loading branch information
SamueleA committed Oct 11, 2023
1 parent 61a93fc commit d29e200
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
34 changes: 17 additions & 17 deletions examples/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ function App() {
projectName: 'Skyweaver',
// logoUrl: 'sw-logo-white.svg',
},
displayedAssets: [
// Matic token
{
contractAddress: ethers.constants.AddressZero,
chainId: 137,
},
// USDC token
{
contractAddress: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
chainId: 137,
},
// skyweaver collectibles
{
contractAddress: '0x631998e91476da5b870d741192fc5cbc55f5a52e',
chainId: 137
}
],
// displayedAssets: [
// // Matic token
// {
// contractAddress: ethers.constants.AddressZero,
// chainId: 137,
// },
// // USDC token
// {
// contractAddress: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174',
// chainId: 137,
// },
// // skyweaver collectibles
// {
// contractAddress: '0x631998e91476da5b870d741192fc5cbc55f5a52e',
// chainId: 137
// }
// ],
}

return (
Expand Down
3 changes: 1 addition & 2 deletions packages/wallet/src/hooks/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ export const useBalancesAssetsSummary = (args: FetchBalancesAssetsArgs, options:
queryKey: ['balancesAssetsSummary', args, options],
queryFn: () => fetchBalancesAssetsSummary(args, options),
retry: true,
staleTime: 1 * time.oneSecond,
// staleTime: 10 * time.oneMinute,
staleTime: 10 * time.oneMinute,
enabled: args.chainIds.length > 0 && !!args.accountAddress
}))

Expand Down

0 comments on commit d29e200

Please sign in to comment.