Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

fix/market details screen nav #4945

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/renderer/components/Breadcrumb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const Breadcrumb = () => (

<Route path="/asset/:assetId+" component={AssetCrumb} />
<Route path="/account/:id/nft-collection/:collectionAddress?" component={NFTCrumb} />
<Route path="/market" component={MarketCrumb} />

<Route path="/market/:currencyId/" component={MarketCrumb} />
</Wrapper>
);
Expand Down
10 changes: 2 additions & 8 deletions src/renderer/screens/market/MarketCoinScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,9 @@ export default function MarketCoinScreen() {
}, [rampCatalog.value]);

const availableOnBuy =
currency && currency.ticker && onRampAvailableTickers.includes(currency.ticker.toUpperCase());
currency && currency.ticker && onRampAvailableTickers.includes(currency.ticker?.toUpperCase());
const availableOnSwap = internalCurrency && swapAvailableIds.includes(internalCurrency.id);

useEffect(() => {
return () => {
selectCurrency();
};
}, [selectCurrency]);

const color = internalCurrency
? getCurrencyColor(internalCurrency, colors.background.main)
: colors.primary.c80;
Expand All @@ -144,7 +138,7 @@ export default function MarketCoinScreen() {
},
});
},
[internalCurrency, history, currency],
[history, currency],
);

const openAddAccounts = useCallback(() => {
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/screens/market/MarketList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ const CurrencyRow = memo(function CurrencyRowItem({
locale,
swapAvailableIds,
onRampAvailableTickers,
range,
style,
}: any) {
const currency = data ? data[index] : null;
Expand All @@ -230,6 +231,7 @@ const CurrencyRow = memo(function CurrencyRowItem({
selectCurrency={selectCurrency}
availableOnBuy={availableOnBuy}
availableOnSwap={availableOnSwap}
range={range}
style={{ ...style }}
/>
);
Expand Down Expand Up @@ -276,7 +278,7 @@ function MarketList({
} = useMarketData();
const dispatch = useDispatch();

const { orderBy, order, starred, search } = requestParams;
const { orderBy, order, starred, search, range } = requestParams;
const currenciesLength = marketData.length;
const freshLoading = loading && !currenciesLength;

Expand Down Expand Up @@ -368,6 +370,7 @@ function MarketList({
locale={locale}
swapAvailableIds={swapAvailableIds}
onRampAvailableTickers={onRampAvailableTickers}
range={range}
/>
)}
</List>
Expand Down Expand Up @@ -400,6 +403,7 @@ function MarketList({
locale={locale}
swapAvailableIds={swapAvailableIds}
onRampAvailableTickers={onRampAvailableTickers}
range={range}
/>
)}
</List>
Expand Down