Skip to content

Commit

Permalink
fix: prevent asset to buy dropdown from opening if asset to buy is al…
Browse files Browse the repository at this point in the history
…ready set (#1693)
  • Loading branch information
derHowie authored Sep 13, 2024
1 parent 0b0f08e commit 09bb6aa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/entries/popup/pages/swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,9 @@ export function Swap({ bridge = false }: { bridge?: boolean }) {
}
setAssetToSellInputValue={setAssetToSellInputValue}
inputRef={assetToSellInputRef}
openDropdownOnMount={inputToOpenOnMount === 'sell'}
openDropdownOnMount={
inputToOpenOnMount === 'sell' && !assetToSell
}
assetToSellNativeValue={assetToSellNativeValue}
assetToSellNativeDisplay={assetToSellNativeDisplay}
setAssetToSellInputNativeValue={
Expand Down Expand Up @@ -881,7 +883,9 @@ export function Swap({ bridge = false }: { bridge?: boolean }) {
assetToSellValue={assetToSellValue}
setAssetToBuyInputValue={setAssetToBuyInputValue}
inputRef={assetToBuyInputRef}
openDropdownOnMount={inputToOpenOnMount === 'buy'}
openDropdownOnMount={
inputToOpenOnMount === 'buy' && !assetToBuy
}
inputDisabled={isCrosschainSwap}
assetToBuyNativeDisplay={assetToBuyNativeDisplay}
assetToSellNativeDisplay={assetToSellNativeDisplay}
Expand Down

0 comments on commit 09bb6aa

Please sign in to comment.