diff --git a/src/components/LiquidatedVaultsTable.tsx b/src/components/LiquidatedVaultsTable.tsx index 8337dc5..499a483 100644 --- a/src/components/LiquidatedVaultsTable.tsx +++ b/src/components/LiquidatedVaultsTable.tsx @@ -50,26 +50,26 @@ export const columns: DataColumn[] = [ type: 'number', header: 'IST Debt Amount', }, - { - accessorKey: 'liquidation_margin_avg', - type: 'percent', - header: 'Liquidation Ratio', - }, - { - accessorKey: 'liquidating_rate', - type: 'usd', - header: 'Liquidation Price', - }, + // { + // accessorKey: 'liquidation_margin_avg', + // type: 'percent', + // header: 'Liquidation Ratio', + // }, + // { + // accessorKey: 'liquidating_rate', + // type: 'usd', + // header: 'Liquidation Price', + // }, { accessorKey: 'liquidated_return_amount', type: 'number', header: 'Collateral Returned Amount', }, - { - accessorKey: 'liquidated_return_amount_usd', - type: 'usd', - header: 'Collateral Returned ($USD)', - }, + // { + // accessorKey: 'liquidated_return_amount_usd', + // type: 'usd', + // header: 'Collateral Returned ($USD)', + // }, ]; export function LiquidatedVaultsTable({ data }: Props) { diff --git a/src/pages/Liquidated.tsx b/src/pages/Liquidated.tsx index cb12f53..4d5431b 100644 --- a/src/pages/Liquidated.tsx +++ b/src/pages/Liquidated.tsx @@ -14,7 +14,7 @@ import { ErrorAlert } from '@/components/ErrorAlert'; export function Liquidated() { const { data, isLoading, error } = useSWR(LIQUIDATIONS_DASHBOARD, (query: string) => - subQueryFetcher(query, SUBQUERY_STAGING_URL), + subQueryFetcher(query), ); const response: LiquidationDashboardResponse = data?.data?.data; @@ -28,28 +28,28 @@ export function Liquidated() { }; // Queries for graph - const { - data: vaultStateDailyData, - isLoading: graphDataIsLoading, - error: graphDataError, - } = useSWR(VAULT_STATE_DAILIES_QUERY, (query: string) => - subQueryFetcher(query, SUBQUERY_STAGING_URL), - ); - const vaultStateDailyResponse: VaultStateDailyResponse = vaultStateDailyData?.data?.data; - const graphDataMap: { [key: number]: GraphData } = {}; - vaultStateDailyResponse?.vaultStatesDailies.nodes?.forEach((vaultState) => { - graphDataMap[Number(vaultState.id)] = { - x: vaultState.blockTimeLast?.split('T')[0], - key: Number(vaultState.id), - active: Number(vaultState.active), - liquidated: Number(vaultState.liquidated) + Number(vaultState.liquidatedClosed), - closed: Number(vaultState.closed), - }; - }); + // const { + // data: vaultStateDailyData, + // isLoading: graphDataIsLoading, + // error: graphDataError, + // } = useSWR(VAULT_STATE_DAILIES_QUERY, (query: string) => + // subQueryFetcher(query, SUBQUERY_STAGING_URL), + // ); + // const vaultStateDailyResponse: VaultStateDailyResponse = vaultStateDailyData?.data?.data; + // const graphDataMap: { [key: number]: GraphData } = {}; + // vaultStateDailyResponse?.vaultStatesDailies.nodes?.forEach((vaultState) => { + // graphDataMap[Number(vaultState.id)] = { + // x: vaultState.blockTimeLast?.split('T')[0], + // key: Number(vaultState.id), + // active: Number(vaultState.active), + // liquidated: Number(vaultState.liquidated) + Number(vaultState.liquidatedClosed), + // closed: Number(vaultState.closed), + // }; + // }); - const graphDataList = populateMissingDays(graphDataMap, GRAPH_DAYS); + // const graphDataList = populateMissingDays(graphDataMap, GRAPH_DAYS); - const errorMessage = error || graphDataError; + const errorMessage = error; if (errorMessage) { return ; } @@ -61,7 +61,7 @@ export function Liquidated() { - + {/* */}
diff --git a/src/queries.ts b/src/queries.ts index af28956..2386237 100644 --- a/src/queries.ts +++ b/src/queries.ts @@ -314,8 +314,6 @@ query { state balance blockTime - oraclePrice - vaultManagerGovernance currentState { id denom diff --git a/tests/__snapshots__/Liquidated.test.tsx.snap b/tests/__snapshots__/Liquidated.test.tsx.snap index e10e49a..d233d7c 100644 --- a/tests/__snapshots__/Liquidated.test.tsx.snap +++ b/tests/__snapshots__/Liquidated.test.tsx.snap @@ -36,5947 +36,6 @@ exports[`Liquidation Dashboard Snapshot tests should match snapshot when data is -
-
-

- Vault States -

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 03/08 - - - - - - - - 03/09 - - - - - - - - 03/10 - - - - - - - - 03/11 - - - - - - - - 03/12 - - - - - - - - 03/13 - - - - - - - - 03/14 - - - - - - - - 03/15 - - - - - - - - 03/16 - - - - - - - - 03/17 - - - - - - - - 03/18 - - - - - - - - 03/19 - - - - - - - - 03/20 - - - - - - - - 03/21 - - - - - - - - 03/22 - - - - - - - - 03/23 - - - - - - - - 03/24 - - - - - - - - 03/25 - - - - - - - - 03/26 - - - - - - - - 03/27 - - - - - - - - 03/28 - - - - - - - - 03/29 - - - - - - - - 03/30 - - - - - - - - 03/31 - - - - - - - - 04/01 - - - - - - - - 04/02 - - - - - - - - 04/03 - - - - - - - - 04/04 - - - - - - - - 04/05 - - - - - - - - 04/06 - - - - - - - - 04/07 - - - - - - - - 04/08 - - - - - - - - 04/09 - - - - - - - - 04/10 - - - - - - - - 04/11 - - - - - - - - 04/12 - - - - - - - - 04/13 - - - - - - - - 04/14 - - - - - - - - 04/15 - - - - - - - - 04/16 - - - - - - - - 04/17 - - - - - - - - 04/18 - - - - - - - - 04/19 - - - - - - - - 04/20 - - - - - - - - 04/21 - - - - - - - - 04/22 - - - - - - - - 04/23 - - - - - - - - 04/24 - - - - - - - - 04/25 - - - - - - - - 04/26 - - - - - - - - 04/27 - - - - - - - - 04/28 - - - - - - - - 04/29 - - - - - - - - 04/30 - - - - - - - - 05/01 - - - - - - - - 05/02 - - - - - - - - 05/03 - - - - - - - - 05/04 - - - - - - - - 05/05 - - - - - - - - 05/06 - - - - - - - - 05/07 - - - - - - - - 05/08 - - - - - - - - 05/09 - - - - - - - - 05/10 - - - - - - - - 05/11 - - - - - - - - 05/12 - - - - - - - - 05/13 - - - - - - - - 05/14 - - - - - - - - 05/15 - - - - - - - - 05/16 - - - - - - - - 05/17 - - - - - - - - 05/18 - - - - - - - - 05/19 - - - - - - - - 05/20 - - - - - - - - 05/21 - - - - - - - - 05/22 - - - - - - - - 05/23 - - - - - - - - 05/24 - - - - - - - - 05/25 - - - - - - - - 05/26 - - - - - - - - 05/27 - - - - - - - - 05/28 - - - - - - - - 05/29 - - - - - - - - 05/30 - - - - - - - - 05/31 - - - - - - - - 06/01 - - - - - - - - 06/02 - - - - - - - - 06/03 - - - - - - - - 06/04 - - - - - - - - 06/05 - - - - - - - - - - - - - 0 - - - - - - - - 150 - - - - - - - - 300 - - - - - - - - 450 - - - - - - - - 600 - - - - - - - - - - - - - 0 - - - - - - - - 150 - - - - - - - - 300 - - - - - - - - 450 - - - - - - - - 600 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
    -
  • - - - - - - - Active - -
  • -
  • - - - - - - - Liquidated - -
  • -
  • - - - - - - - Closed - -
  • -
-
- -
-
-
-

@@ -6070,36 +129,6 @@ exports[`Liquidation Dashboard Snapshot tests should match snapshot when data is - - - - - - - - - - -
- 230% -
- - -
- $8.72 -
- @@ -6200,15 +196,6 @@ exports[`Liquidation Dashboard Snapshot tests should match snapshot when data is 4.042 - -
- $6.87 -
- - -
- 190% -
- - -
- $13.46 -
- @@ -6275,15 +244,6 @@ exports[`Liquidation Dashboard Snapshot tests should match snapshot when data is 3.749 - -
- $4.61 -
- - -
- 200% -
- - -
- $26.03 -
- @@ -6350,15 +292,6 @@ exports[`Liquidation Dashboard Snapshot tests should match snapshot when data is 16.157 - -
- $36.03 -
- - -
- 170% -
- - -
- $1.13 -
- @@ -6425,15 +340,6 @@ exports[`Liquidation Dashboard Snapshot tests should match snapshot when data is 0.001 - -
- $0.00 -
- - -
- 100% -
- - -
- $4.92 -
- @@ -6500,15 +388,6 @@ exports[`Liquidation Dashboard Snapshot tests should match snapshot when data is 921.651 - -
- $949.30 -
- @@ -6556,35 +435,6 @@ exports[`Liquidation Dashboard Snapshot tests should match snapshot when data is -
-
-

- Vault States -

-
-
-
-
-
-
-
-