Skip to content

Commit

Permalink
feat: enable SC wallet to change destination chain (#2139)
Browse files Browse the repository at this point in the history
  • Loading branch information
fionnachan authored Jan 17, 2025
1 parent 3dceb7a commit 4a8a773
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ export function NetworkButton({

const hasOneOrLessChain = chains.length <= 1

const disabled = hasOneOrLessChain || isSmartContractWallet || isLoading
const disabled =
hasOneOrLessChain ||
(isSmartContractWallet && type === 'source') ||
isLoading

const buttonStyle = {
backgroundColor: getBridgeUiConfigForChain(selectedChainId).color
Expand Down Expand Up @@ -405,6 +408,7 @@ export const NetworkSelectionContainer = (
const [oneNovaTransferDialogProps, openOneNovaTransferDialog] = useDialog()
const [, setQueryParams] = useArbQueryParams()
const { setAdvancedSettingsCollapsed } = useAdvancedSettingsStore()
const { isSmartContractWallet } = useAccountType()

const isSource = props.type === 'source'

Expand Down Expand Up @@ -442,7 +446,10 @@ export const NetworkSelectionContainer = (

actions.app.setSelectedToken(null)
setQueryParams({ destinationAddress: undefined })
setAdvancedSettingsCollapsed(true)

if (!isSmartContractWallet) {
setAdvancedSettingsCollapsed(true)
}
},
[
isSource,
Expand All @@ -451,7 +458,8 @@ export const NetworkSelectionContainer = (
actions.app,
setQueryParams,
setAdvancedSettingsCollapsed,
openOneNovaTransferDialog
openOneNovaTransferDialog,
isSmartContractWallet
]
)

Expand Down

0 comments on commit 4a8a773

Please sign in to comment.