Skip to content

Commit

Permalink
Refactor sidebar hooks [SW-647] (#4641)
Browse files Browse the repository at this point in the history
* fix: Remove cache in useAllOwnedSafes

* fix: Write tests for useAllSafes

* fix: Add more tests for useAllSafes

* refactor: Extract useAllSafes logic into separate functions

* refactor: Extract useHasSafes, remove sorting, iterate over all chains

* fix: Write test cases for buildSafeItem and prepareAddresses

* fix: Implement tests for _prepareAddresses and _buildSafeItem

* fix: Check undeployed safe owners to determine readOnly status

* fix: Remove condition

* fix: Remove isOwnerOfAddedSafe check
  • Loading branch information
usame-algan authored Dec 13, 2024
1 parent 52d6300 commit 49dfe62
Show file tree
Hide file tree
Showing 5 changed files with 562 additions and 56 deletions.
2 changes: 1 addition & 1 deletion src/components/welcome/WelcomeLogin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useRouter } from 'next/router'
import { CREATE_SAFE_EVENTS } from '@/services/analytics/events/createLoadSafe'
import { OVERVIEW_EVENTS, OVERVIEW_LABELS, trackEvent } from '@/services/analytics'
import useWallet from '@/hooks/wallets/useWallet'
import { useHasSafes } from '@/features/myAccounts/hooks/useAllSafes'
import useHasSafes from '@/features/myAccounts/hooks/useHasSafes'
import Track from '@/components/common/Track'
import { useCallback, useEffect, useState } from 'react'
import WalletLogin from './WalletLogin'
Expand Down
Loading

0 comments on commit 49dfe62

Please sign in to comment.