Skip to content
Merged
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
1 change: 0 additions & 1 deletion apps/api-reference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"bs58": "catalog:",
"clsx": "catalog:",
"connectkit": "catalog:",
"cryptocurrency-icons": "catalog:",
"framer-motion": "catalog:",
"next": "catalog:",
"next-themes": "catalog:",
Expand Down
5 changes: 0 additions & 5 deletions apps/api-reference/src/apis/evm/get-update-fee.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import Btc from "cryptocurrency-icons/svg/color/btc.svg";
import Eth from "cryptocurrency-icons/svg/color/eth.svg";

import {
readApi,
BTCUSD,
Expand Down Expand Up @@ -34,12 +31,10 @@ export const getUpdateFee = readApi<"updateData">({
examples: [
{
name: "Latest BTC/USD update data",
icon: Btc,
parameters: () => getParams(BTCUSD),
},
{
name: "Latest ETH/USD update data",
icon: Eth,
parameters: () => getParams(ETHUSD),
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import Btc from "cryptocurrency-icons/svg/color/btc.svg";
import Eth from "cryptocurrency-icons/svg/color/eth.svg";

import {
BTCUSD,
ETHUSD,
Expand Down Expand Up @@ -85,12 +82,10 @@ export const parsePriceFeedUpdatesUnique = writeApi<
examples: [
{
name: "Latest BTC/USD update data",
icon: Btc,
parameters: (ctx) => getParams(BTCUSD, ctx),
},
{
name: "Latest ETH/USD update data",
icon: Eth,
parameters: (ctx) => getParams(ETHUSD, ctx),
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import Btc from "cryptocurrency-icons/svg/color/btc.svg";
import Eth from "cryptocurrency-icons/svg/color/eth.svg";

import {
BTCUSD,
ETHUSD,
Expand Down Expand Up @@ -80,12 +77,10 @@ export const parsePriceFeedUpdates = writeApi<
examples: [
{
name: "Latest BTC/USD update data",
icon: Btc,
parameters: (ctx) => getParams(BTCUSD, ctx),
},
{
name: "Latest ETH/USD update data",
icon: Eth,
parameters: (ctx) => getParams(ETHUSD, ctx),
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import Btc from "cryptocurrency-icons/svg/color/btc.svg";
import Eth from "cryptocurrency-icons/svg/color/eth.svg";

import {
BTCUSD,
ETHUSD,
Expand Down Expand Up @@ -75,12 +72,10 @@ export const updatePriceFeedsIfNecessary = writeApi<
examples: [
{
name: "Latest BTC/USD update data",
icon: Btc,
parameters: (ctx) => getParams(BTCUSD, ctx),
},
{
name: "Latest ETH/USD update data",
icon: Eth,
parameters: (ctx) => getParams(ETHUSD, ctx),
},
],
Expand Down
5 changes: 0 additions & 5 deletions apps/api-reference/src/apis/evm/update-price-feeds.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import Btc from "cryptocurrency-icons/svg/color/btc.svg";
import Eth from "cryptocurrency-icons/svg/color/eth.svg";

import {
BTCUSD,
ETHUSD,
Expand Down Expand Up @@ -54,12 +51,10 @@ export const updatePriceFeeds = writeApi<"updateData" | "fee">({
examples: [
{
name: "Latest BTC/USD update data",
icon: Btc,
parameters: (ctx) => getParams(BTCUSD, ctx),
},
{
name: "Latest ETH/USD update data",
icon: Eth,
parameters: (ctx) => getParams(ETHUSD, ctx),
},
],
Expand Down
1 change: 0 additions & 1 deletion apps/insights/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"async-cache-dedupe": "catalog:",
"bs58": "catalog:",
"clsx": "catalog:",
"cryptocurrency-icons": "catalog:",
"date-fns": "catalog:",
"csv-stringify": "catalog:",
"dnum": "catalog:",
Expand Down
17 changes: 3 additions & 14 deletions apps/insights/src/components/PriceFeed/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,7 @@ const PriceFeedHeaderImpl = (props: PriceFeedHeaderImplProps) => (
description: item.product.description,
displaySymbol: item.product.display_symbol,
key: item.product.price_account,
icon: (
<PriceFeedIcon
assetClass={item.product.asset_type}
symbol={item.symbol}
/>
),
icon: <PriceFeedIcon assetClass={item.product.asset_type} />,
})),
})}
>
Expand All @@ -100,10 +95,7 @@ const PriceFeedHeaderImpl = (props: PriceFeedHeaderImplProps) => (
description: props.feed.product.description,
displaySymbol: props.feed.product.display_symbol,
icon: (
<PriceFeedIcon
assetClass={props.feed.product.asset_type}
symbol={props.feed.symbol}
/>
<PriceFeedIcon assetClass={props.feed.product.asset_type} />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I see <PriceFeedIcon assetClass={props.feed.product.asset_type} /> in a lot of places. We could consider keeping things DRY and hoisting this up to a variable, since it seems it's most the same implementation everywhere:

const priceFeedIcon = <PriceFeedIcon assetClass={props.feed.product.asset_type} />

// then, later, down below
icon: priceFeedIcon

This way, if we need to change this component for whatever reason, we only need to change it in one place 🙂

),
})}
/>
Expand All @@ -116,10 +108,7 @@ const PriceFeedHeaderImpl = (props: PriceFeedHeaderImplProps) => (
description: props.feed.product.description,
displaySymbol: props.feed.product.display_symbol,
icon: (
<PriceFeedIcon
assetClass={props.feed.product.asset_type}
symbol={props.feed.symbol}
/>
<PriceFeedIcon assetClass={props.feed.product.asset_type} />
),
})}
/>
Expand Down
Loading
Loading