Skip to content

Commit

Permalink
Merge pull request #157 from dhedge/fix/useIsOffchainAaveWithdrawSupp…
Browse files Browse the repository at this point in the history
…orted

fix: remove vaultConnected condition from useIsOffchainAaveWithdrawSu…
  • Loading branch information
artsiomYavorski authored Jan 29, 2025
2 parents ecb0a33 + 9587c07 commit 2e826f2
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { useTradingPanelPoolConfig } from 'core-kit/hooks/state'
import { useIsDhedgeVaultConnected } from 'core-kit/hooks/user'
import { useConfigContextParams } from 'trading-widget/providers/config-provider'

export const useIsOffchainAaveWithdrawSupported = () => {
const { chainId } = useTradingPanelPoolConfig()
const { aaveOffchainWithdrawChainIds } = useConfigContextParams()
const isDhedgeVaultConnected = useIsDhedgeVaultConnected()

return (
aaveOffchainWithdrawChainIds.includes(chainId) && !isDhedgeVaultConnected
)
return aaveOffchainWithdrawChainIds.includes(chainId)
}

0 comments on commit 2e826f2

Please sign in to comment.