From aa799524892e18e5a790ab242ba35432247dde02 Mon Sep 17 00:00:00 2001 From: TTNguyenDev Date: Tue, 5 Mar 2024 15:01:57 +0700 Subject: [PATCH 1/2] fix: rm collateral --- .../components/agreement/context/types.tsx | 24 +++++------ packages/web-app/lib/subgraph/agreement.tsx | 37 +++++++++-------- packages/web-app/lib/subgraph/agreements.tsx | 25 ++++++------ packages/web-app/lib/types.tsx | 40 +++++++++---------- 4 files changed, 62 insertions(+), 64 deletions(-) diff --git a/packages/web-app/components/agreement/context/types.tsx b/packages/web-app/components/agreement/context/types.tsx index a3726eaf..6309df20 100644 --- a/packages/web-app/components/agreement/context/types.tsx +++ b/packages/web-app/components/agreement/context/types.tsx @@ -1,25 +1,25 @@ export interface PositionParams { - status: string; - collateral: string; + status: string; + // collateral: string; } export interface ResolverParams { - balance: string; - proof: string[]; + balance: string; + proof: string[]; } export interface UserPosition { - status: string; - deposit: string; - collateral: string; - resolver?: ResolverParams; + status: string; + deposit: string; + // collateral: string; + resolver?: ResolverParams; } export interface Token { - name: string; - symbol: string; - decimals: number; - address: string; + name: string; + symbol: string; + decimals: number; + address: string; } export type PositionMap = { [address: string]: PositionParams }; diff --git a/packages/web-app/lib/subgraph/agreement.tsx b/packages/web-app/lib/subgraph/agreement.tsx index fd2b3511..a2b87010 100644 --- a/packages/web-app/lib/subgraph/agreement.tsx +++ b/packages/web-app/lib/subgraph/agreement.tsx @@ -1,24 +1,24 @@ import { gql } from "graphql-request"; export interface AgreementData { - agreement: { - id: string; - framework: { - id: string; - }; - termsHash: string; - criteria: string; - status: string; - token: string; - metadataURI: string; - createdAt: string; - positions: { - party: string; - collateral: string; - deposit: string; - status: string; - }[]; - }; + agreement: { + id: string; + framework: { + id: string; + }; + termsHash: string; + criteria: string; + status: string; + token: string; + metadataURI: string; + createdAt: string; + positions: { + party: string; + // collateral: string; + deposit: string; + status: string; + }[]; + }; } export const agreementQuery = gql` @@ -36,7 +36,6 @@ export const agreementQuery = gql` createdAt positions { party - collateral deposit status } diff --git a/packages/web-app/lib/subgraph/agreements.tsx b/packages/web-app/lib/subgraph/agreements.tsx index 8156810c..16bf3b98 100644 --- a/packages/web-app/lib/subgraph/agreements.tsx +++ b/packages/web-app/lib/subgraph/agreements.tsx @@ -1,25 +1,24 @@ import { gql } from "graphql-request"; export interface AgreementPositionsData { - agreementPositions: { - party: string; - collateral: string; - status: string; - agreement: { - id: string; - metadataURI: string; - createdAt: string; - status: string; - token: string; - }; - }[]; + agreementPositions: { + party: string; + // collateral: string; + status: string; + agreement: { + id: string; + metadataURI: string; + createdAt: string; + status: string; + token: string; + }; + }[]; } export const agreementsPositionsQuery = gql` query GetUserAgreements($account: Bytes!) { agreementPositions(where: { party: $account }) { party - collateral status agreement { id diff --git a/packages/web-app/lib/types.tsx b/packages/web-app/lib/types.tsx index 9cee8f62..bfc8ee65 100644 --- a/packages/web-app/lib/types.tsx +++ b/packages/web-app/lib/types.tsx @@ -1,31 +1,31 @@ export interface AgreementBase { - id: string; - termsHash: string; - metadataURI: string; - status: string; + id: string; + termsHash: string; + metadataURI: string; + status: string; } export interface Agreement extends AgreementBase { - title: string; - token: string; - framework: string; - createdAt: string; - termsPrivacy: string; - termsURI?: string; - termsFilename?: string; + title: string; + token: string; + framework: string; + createdAt: string; + termsPrivacy: string; + termsURI?: string; + termsFilename?: string; } export interface AgreementPosition { - party: string; - collateral: string; - deposit: string; - status: string; - resolver?: { - balance: string; - proof: string[]; - }; + party: string; + // collateral: string; + deposit: string; + status: string; + resolver?: { + balance: string; + proof: string[]; + }; } export interface AgreementWithPositions extends Agreement { - positions: AgreementPosition[]; + positions: AgreementPosition[]; } From 1045fd302bd8f8dd82985a1509c0c73b00e6eb0d Mon Sep 17 00:00:00 2001 From: TTNguyenDev Date: Tue, 5 Mar 2024 15:03:12 +0700 Subject: [PATCH 2/2] lint --- .../components/agreement/context/types.tsx | 24 +++++------ packages/web-app/lib/subgraph/agreement.tsx | 36 ++++++++--------- packages/web-app/lib/subgraph/agreements.tsx | 24 +++++------ packages/web-app/lib/types.tsx | 40 +++++++++---------- 4 files changed, 62 insertions(+), 62 deletions(-) diff --git a/packages/web-app/components/agreement/context/types.tsx b/packages/web-app/components/agreement/context/types.tsx index 6309df20..f192ca6f 100644 --- a/packages/web-app/components/agreement/context/types.tsx +++ b/packages/web-app/components/agreement/context/types.tsx @@ -1,25 +1,25 @@ export interface PositionParams { - status: string; - // collateral: string; + status: string; + // collateral: string; } export interface ResolverParams { - balance: string; - proof: string[]; + balance: string; + proof: string[]; } export interface UserPosition { - status: string; - deposit: string; - // collateral: string; - resolver?: ResolverParams; + status: string; + deposit: string; + // collateral: string; + resolver?: ResolverParams; } export interface Token { - name: string; - symbol: string; - decimals: number; - address: string; + name: string; + symbol: string; + decimals: number; + address: string; } export type PositionMap = { [address: string]: PositionParams }; diff --git a/packages/web-app/lib/subgraph/agreement.tsx b/packages/web-app/lib/subgraph/agreement.tsx index a2b87010..1f7cea09 100644 --- a/packages/web-app/lib/subgraph/agreement.tsx +++ b/packages/web-app/lib/subgraph/agreement.tsx @@ -1,24 +1,24 @@ import { gql } from "graphql-request"; export interface AgreementData { - agreement: { - id: string; - framework: { - id: string; - }; - termsHash: string; - criteria: string; - status: string; - token: string; - metadataURI: string; - createdAt: string; - positions: { - party: string; - // collateral: string; - deposit: string; - status: string; - }[]; - }; + agreement: { + id: string; + framework: { + id: string; + }; + termsHash: string; + criteria: string; + status: string; + token: string; + metadataURI: string; + createdAt: string; + positions: { + party: string; + // collateral: string; + deposit: string; + status: string; + }[]; + }; } export const agreementQuery = gql` diff --git a/packages/web-app/lib/subgraph/agreements.tsx b/packages/web-app/lib/subgraph/agreements.tsx index 16bf3b98..71299620 100644 --- a/packages/web-app/lib/subgraph/agreements.tsx +++ b/packages/web-app/lib/subgraph/agreements.tsx @@ -1,18 +1,18 @@ import { gql } from "graphql-request"; export interface AgreementPositionsData { - agreementPositions: { - party: string; - // collateral: string; - status: string; - agreement: { - id: string; - metadataURI: string; - createdAt: string; - status: string; - token: string; - }; - }[]; + agreementPositions: { + party: string; + // collateral: string; + status: string; + agreement: { + id: string; + metadataURI: string; + createdAt: string; + status: string; + token: string; + }; + }[]; } export const agreementsPositionsQuery = gql` diff --git a/packages/web-app/lib/types.tsx b/packages/web-app/lib/types.tsx index bfc8ee65..6f5fd2ae 100644 --- a/packages/web-app/lib/types.tsx +++ b/packages/web-app/lib/types.tsx @@ -1,31 +1,31 @@ export interface AgreementBase { - id: string; - termsHash: string; - metadataURI: string; - status: string; + id: string; + termsHash: string; + metadataURI: string; + status: string; } export interface Agreement extends AgreementBase { - title: string; - token: string; - framework: string; - createdAt: string; - termsPrivacy: string; - termsURI?: string; - termsFilename?: string; + title: string; + token: string; + framework: string; + createdAt: string; + termsPrivacy: string; + termsURI?: string; + termsFilename?: string; } export interface AgreementPosition { - party: string; - // collateral: string; - deposit: string; - status: string; - resolver?: { - balance: string; - proof: string[]; - }; + party: string; + // collateral: string; + deposit: string; + status: string; + resolver?: { + balance: string; + proof: string[]; + }; } export interface AgreementWithPositions extends Agreement { - positions: AgreementPosition[]; + positions: AgreementPosition[]; }