Skip to content

Commit

Permalink
fix: token select modal for buy/sell
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 committed Aug 13, 2024
1 parent 90361b3 commit 81bf850
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/web/components/complex/asset-fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ interface TokenSelectProps {
isFetchingNextPageAssets?: boolean;
isLoadingSelectAssets?: boolean;
page?: EventPage;
assetQueryInput?: string;
setAssetQueryInput?: (input: string) => void;
}

const AssetFieldsetTokenSelector = ({
Expand All @@ -178,6 +180,8 @@ const AssetFieldsetTokenSelector = ({
isFetchingNextPageAssets,
page = "Swap Page",
isLoadingSelectAssets,
assetQueryInput,
setAssetQueryInput,
...rest
}: TokenSelectProps) => {
const { t } = useTranslation();
Expand Down Expand Up @@ -259,6 +263,8 @@ const AssetFieldsetTokenSelector = ({
hasNextPageAssets={hasNextPageAssets}
isFetchingNextPageAssets={isFetchingNextPageAssets}
isLoadingSelectAssets={isLoadingSelectAssets}
assetQueryInput={assetQueryInput}
setAssetQueryInput={setAssetQueryInput}
/>
)}
</>
Expand Down
2 changes: 2 additions & 0 deletions packages/web/components/place-limit-tool/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ export const PlaceLimitTool: FunctionComponent<PlaceLimitToolProps> = observer(
swapState.marketState.isLoadingSelectAssets
}
data-testid="token-in"
setAssetQueryInput={swapState.marketState.setAssetsQueryInput}
assetQueryInput={swapState.marketState.assetsQueryInput}
/>
</div>
<AssetFieldsetFooter>
Expand Down
1 change: 0 additions & 1 deletion packages/web/components/swap-tool/alt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ export const AltSwapTool: FunctionComponent<SwapToolProps> = observer(
<AssetFieldsetTokenSelector
selectedCoinDenom={swapState.fromAsset?.coinDenom}
selectedCoinImageUrl={swapState.fromAsset?.coinImageUrl}
isModalExternal
onSelectorClick={() =>
showTokenSelectRecommendedTokens &&
setOneTokenSelectOpen("from")
Expand Down

0 comments on commit 81bf850

Please sign in to comment.