Skip to content

Commit

Permalink
Merge branch 'feat/implement-limit-orders' into fabryscript/swap-from…
Browse files Browse the repository at this point in the history
…-another-asset-cta
  • Loading branch information
fabryscript committed Jul 3, 2024
2 parents 0570277 + d9c9635 commit fa901e9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/web/modals/token-select-modal-limit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export const TokenSelectModalLimit: FunctionComponent<{
keyboardSelectedIndexRef,
] = useStateRef(0);

const [assets, _setAssets] = useState(selectableAssets);
const [_isRequestingClose, setIsRequestingClose] = useState(false);
const [confirmUnverifiedAssetDenom, setConfirmUnverifiedAssetDenom] =
useState<string | null>(null);
Expand All @@ -99,7 +98,7 @@ export const TokenSelectModalLimit: FunctionComponent<{
const shouldShowUnverifiedAssets =
showUnverifiedAssetsSetting?.state.showUnverifiedAssets;

const assetsRef = useLatest(assets);
const assetsRef = useLatest(selectableAssets);

const searchBoxRef = useRef<HTMLInputElement>(null);
const quickSelectRef = useRef<HTMLDivElement>(null);
Expand All @@ -120,7 +119,7 @@ export const TokenSelectModalLimit: FunctionComponent<{

const onClickAsset = (coinDenom: string) => {
let isRecommended = false;
const selectedAsset = assets.find(
const selectedAsset = selectableAssets.find(
(asset) => asset && asset.coinDenom === coinDenom
);

Expand Down Expand Up @@ -196,7 +195,7 @@ export const TokenSelectModalLimit: FunctionComponent<{
// });

// TODO: Wire up search
const [, setQuery, results] = useFilteredData(assets, [
const [, setQuery, results] = useFilteredData(selectableAssets, [
"coinDenom",
"coinName",
]);
Expand All @@ -206,7 +205,7 @@ export const TokenSelectModalLimit: FunctionComponent<{
setQuery(nextValue);
};

const assetToActivate = assets.find(
const assetToActivate = selectableAssets.find(
(asset) => asset && asset.coinDenom === confirmUnverifiedAssetDenom
);

Expand Down

0 comments on commit fa901e9

Please sign in to comment.