Skip to content

Commit

Permalink
fix notifications revalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
yornaath committed Oct 6, 2023
1 parent 4eef663 commit 2f5ff79
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/top-bar/Alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const Alerts = () => {
onMouseEnter={mouseEnterMenuHandler}
onMouseLeave={mouseLeaveMenuHandler}
className={`
fixed md:absolute left-0 md:translate-x-[50%] md:left-auto p-2 md:px-4 md:max-h-[700px]
fixed md:absolute left-0 md:translate-x-[50%] md:left-auto p-2 md:px-4 md:max-h-[664px]
overflow-y-scroll md:right-0 bottom-0 md:bottom-auto z-50 py-3 top-11
md:top-auto mt-6 md:mt-6 w-full overflow-hidden h-full md:h-auto md:w-96 pb-20 md:pb-0
origin-top-right divide-gray-100 md:rounded-md focus:outline-none
Expand Down
19 changes: 12 additions & 7 deletions lib/hooks/queries/useRedeemableMarkets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,22 @@ export const useRedeemableMarkets = (account?: string) => {
const [sdk, id] = useSdkv2();
const { data: tokenPositions } = useAccountTokenPositions(account);

const enabled =
sdk &&
account &&
tokenPositions &&
tokenPositions.length > 0 &&
isIndexedSdk(sdk);
const enabled = sdk && account && tokenPositions && isIndexedSdk(sdk);

return useQuery(
[id, redeemableMarketsRootKey, account],
[
id,
redeemableMarketsRootKey,
account,
tokenPositions
?.map((p) => p.id)
.sort()
.join("|"),
],
async () => {
if (enabled) {
if (!tokenPositions.length) return [];

const outcomeAssetIds = tokenPositions
.map((tokenPosition) =>
parseAssetId(tokenPosition.assetId).unwrapOr(null),
Expand Down

0 comments on commit 2f5ff79

Please sign in to comment.