Skip to content

Commit

Permalink
[BX-1122] fix context menu swap prepop (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
derHowie authored Nov 8, 2023
1 parent 8b10c03 commit 859a773
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ export function TokenContextMenu({ children, token }: TokenContextMenuProps) {

const onSwap = () => {
setSelectedToken(token);
if (allowSwap) navigateToSwaps();
else {
if (allowSwap) {
isNavigating = true;
navigateToSwaps();
} else {
triggerAlert({ text: i18n.t('alert.coming_soon') });
setSelectedToken(); // clear selected token
}
Expand Down

0 comments on commit 859a773

Please sign in to comment.