Skip to content

Commit

Permalink
release/5.22.1 (#1383)
Browse files Browse the repository at this point in the history
* confirm we're swapping when checking soroswap assets

* fix styling for Soroban token icon in dropdown
  • Loading branch information
piyalbasu authored Jul 24, 2024
1 parent d248f2a commit c3d23fa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ $loader-light-color: #444961;

&--soroban-token {
border: none;

svg {
margin: 0 !important;
height: auto !important;
width: auto !important;
}
}

&--error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { getTokenBalance, isContractId } from "popup/helpers/soroban";
import { ScamAssetIcon } from "popup/components/account/ScamAssetIcon";
import { Balance, Balances, SorobanBalance } from "@shared/api/types";
import { formatAmount } from "popup/helpers/formatters";
import { useIsSoroswapEnabled } from "popup/helpers/useIsSwap";
import { useIsSoroswapEnabled, useIsSwap } from "popup/helpers/useIsSwap";

import "./styles.scss";

Expand All @@ -42,6 +42,7 @@ export const SelectAssetRows = ({ assetRows }: SelectAssetRowsProps) => {
const dispatch: AppDispatch = useDispatch();
const history = useHistory();
const isSoroswapEnabled = useIsSoroswapEnabled();
const isSwap = useIsSwap();

const getAccountBalance = (canonical: string) => {
if (!balances) {
Expand Down Expand Up @@ -80,7 +81,7 @@ export const SelectAssetRows = ({ assetRows }: SelectAssetRowsProps) => {
const canonical = getCanonicalFromAsset(code, issuer);
let isSoroswap = false;

if (isSoroswapEnabled) {
if (isSoroswapEnabled && isSwap) {
// check if either asset is a Soroswap token
const otherAsset = getAssetFromCanonical(
assetSelect.isSource
Expand Down

0 comments on commit c3d23fa

Please sign in to comment.