Skip to content

Commit

Permalink
fix: removed tradetrust from package
Browse files Browse the repository at this point in the history
  • Loading branch information
RishabhS7 committed Dec 17, 2024
1 parent a851ed0 commit 5cc5580
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 24 deletions.
4 changes: 0 additions & 4 deletions package-lock.json

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

4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@
"@reduxjs/toolkit": "^1.6.1",
"@tradetrust-tt/decentralized-renderer-react-components": "^3.14.3",
"@tradetrust-tt/document-store": "^4.1.0",
"@tradetrust-tt/token-registry": "^5.1.0",
"@tradetrust-tt/tradetrust": "^6.9.7",
"@tradetrust-tt/tradetrust-ui-components": "^3.0.0",
"@tradetrust-tt/tradetrust-utils": "^2.1.1",
"@tradetrust-tt/tt-verify": "^9.2.0",
"@trustvc/trustvc": "^1.0.4",
"@types/gtag.js": "0.0.8",
"buffer": "^6.0.3",
Expand Down
5 changes: 3 additions & 2 deletions src/common/hooks/useContractFunctionHook.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { TitleEscrow, TradeTrustToken } from "@tradetrust-tt/token-registry/dist/contracts";
import { v5Contracts } from "@trustvc/trustvc";
import { TypedContractMethod } from "@trustvc/trustvc";
import { BaseContract, ContractReceipt, ContractTransaction } from "ethers";
import { useCallback, useState } from "react";

export type ContractFunctionState = "UNINITIALIZED" | "INITIALIZED" | "PENDING_CONFIRMATION" | "CONFIRMED" | "ERROR";
type UnwrapPromise<T> = T extends Promise<infer U> ? U : T;

type TitleEscrow = v5Contracts.TitleEscrow;
type TradeTrustToken = v5Contracts.TradeTrustToken;
// Todo
// Deploy
// Deploy & Initialize
Expand Down
4 changes: 2 additions & 2 deletions src/common/hooks/useRestoreToken.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { TradeTrustToken } from "@tradetrust-tt/token-registry/contracts";
import { v5Contracts } from "@trustvc/trustvc";
import { providers, Signer } from "ethers";
import { useCallback, useEffect, useState } from "react";
import { getLogger } from "../../utils/logger";
import { UnsupportedNetworkError } from "../errors";
import { ContractFunctionState } from "./useContractFunctionHook";

const { error: errorLogger } = getLogger("services:userestoretoken");

type TradeTrustToken = v5Contracts.TradeTrustToken;
export const useRestoreToken = (
provider: providers.Provider | Signer | undefined,
contractInstance?: TradeTrustToken,
Expand Down
4 changes: 3 additions & 1 deletion src/common/hooks/useSupportsInterface.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { TitleEscrow, TradeTrustToken } from "@tradetrust-tt/token-registry/dist/contracts";
import { v5Contracts } from "@trustvc/trustvc";
import { Contract } from "ethers";
import { useEffect, useState } from "react";
import { getLogger } from "../../utils/logger";
import { useContractFunctionHook } from "./useContractFunctionHook";

const { error } = getLogger("services:usesupportsinterface");
type TitleEscrow = v5Contracts.TitleEscrow;
type TradeTrustToken = v5Contracts.TradeTrustToken;

interface Erc165Contract extends Contract {
supportsInterface: (interfaceId: []) => Promise<boolean> | undefined;
Expand Down
4 changes: 2 additions & 2 deletions src/common/hooks/useTitleEscrowContract.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useState, useEffect, useCallback } from "react";
import { providers, Signer } from "ethers";
import { v5Contracts } from "@trustvc/trustvc";
import { TitleEscrow } from "@tradetrust-tt/token-registry/contracts";
import { TradeTrustToken } from "@tradetrust-tt/token-registry/contracts";
import { BurnAddress } from "../../constants/chain-info";
const { TitleEscrowFactory__factory, TitleEscrow__factory } = v5Contracts;
type TitleEscrow = v5Contracts.TitleEscrow;
type TradeTrustToken = v5Contracts.TradeTrustToken;
interface useTitleEscrowContractProps {
titleEscrow?: TitleEscrow;
documentOwner?: string;
Expand Down
5 changes: 3 additions & 2 deletions src/common/hooks/useTokenRegistryRole.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { TradeTrustToken } from "@tradetrust-tt/token-registry/dist/contracts";
import { v5Contracts } from "@trustvc/trustvc";

import { BytesLike } from "ethers";
import { useEffect, useState } from "react";
import { useContractFunctionHook } from "./useContractFunctionHook";

type TradeTrustToken = v5Contracts.TradeTrustToken;
export const useTokenRegistryRole = ({
account,
role,
Expand Down
7 changes: 0 additions & 7 deletions src/services/verify/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
// import {
// DocumentsToVerify,
// openAttestationDidIdentityProof,
// openAttestationVerifiers,
// verificationBuilder,
// VerificationFragment,
// } from "@tradetrust-tt/tt-verify";
import {
DocumentsToVerify,
openAttestationDidIdentityProof,
Expand Down

0 comments on commit 5cc5580

Please sign in to comment.