Skip to content

Commit

Permalink
update SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenlejoe committed Jan 24, 2024
1 parent 555f3f0 commit deea216
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 22 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@
"vite-plugin-dts": "^1.7.3",
"vite-plugin-lib-inject-css": "^1.3.0",
"vite-tsconfig-paths": "^4.2.1",
"@covalenthq/client-sdk": "^0.7.5"
"@covalenthq/client-sdk": "^0.7.6"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"dependencies": {
"@covalenthq/client-sdk": "^0.7.5",
"@covalenthq/client-sdk": "^0.7.6",
"@headlessui/react": "^1.7.17",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-checkbox": "^1.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ import { capitalizeFirstLetter } from "@/utils/functions/capitalize";

export const XYKOverviewLiquidityView: React.FC<
XYKOverviewLiquidityViewProps
> = ({
chain_name,
dex_name,
pool_address,
pool_data,
displayMetrics = "both",
}) => {
> = ({ chain_name, dex_name, overview_data, displayMetrics = "both" }) => {
const [maybeResult, setResult] =
useState<Option<UniswapLikeEcosystemCharts>>(None);
const [chartData, setChartData] = useState<Option<any>>(None);
Expand All @@ -38,7 +32,7 @@ export const XYKOverviewLiquidityView: React.FC<
maybeResult.match({
None: () => null,
Some: (response: any) => {
const chart_key = `${timeSeries}_timeseries_${period}d`;
const chart_key = `${timeSeries}_chart_${period}d`;
const value_key =
timeSeries === "price"
? "price_of_token0_in_token1"
Expand All @@ -59,8 +53,8 @@ export const XYKOverviewLiquidityView: React.FC<

useEffect(() => {
setColor(rootColor());
if (pool_data) {
setResult(new Some(pool_data));
if (overview_data) {
setResult(new Some(overview_data));
return;
}
(async () => {
Expand All @@ -72,7 +66,7 @@ export const XYKOverviewLiquidityView: React.FC<
);
setResult(new Some(response.data.items[0]));
})();
}, [pool_data, dex_name, pool_address, chain_name, displayMetrics]);
}, [overview_data, dex_name, chain_name, displayMetrics]);

useEffect(() => {
handleChartData();
Expand Down
3 changes: 1 addition & 2 deletions src/utils/types/molecules.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export interface NFTVolumeViewProps {
export interface XYKOverviewLiquidityViewProps {
chain_name: Chain;
dex_name: string;
pool_address: string;
pool_data?: UniswapLikeEcosystemCharts;
overview_data?: UniswapLikeEcosystemCharts;
displayMetrics?: "both" | "liquidity" | "volume";
}

0 comments on commit deea216

Please sign in to comment.