From f609cee461ba5d2625c46dd787d6a4931b867425 Mon Sep 17 00:00:00 2001 From: Kai Hirota <34954529+kaihirota@users.noreply.github.com> Date: Fri, 23 Feb 2024 11:52:50 +1100 Subject: [PATCH] remove get projects --- examples/getProjects.ts | 16 ---------------- src/ImmutableX.ts | 25 ------------------------- src/workflows/workflows.ts | 19 ------------------- 3 files changed, 60 deletions(-) delete mode 100644 examples/getProjects.ts diff --git a/examples/getProjects.ts b/examples/getProjects.ts deleted file mode 100644 index 572d0300..00000000 --- a/examples/getProjects.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Config, ImmutableX } from '@imtbl/core-sdk'; -import { generateWalletConnection } from './libs/walletConnection'; - -(async () => { - try { - const client = new ImmutableX(Config.SANDBOX); - const wallet = await generateWalletConnection('sepolia'); - const pageSize = 200; - const projects = await client.getProjects(wallet.ethSigner, pageSize); - - console.log('projects', projects); - } catch (err) { - console.error(err); - process.exit(1); - } -})(); diff --git a/src/ImmutableX.ts b/src/ImmutableX.ts index 988f830b..0e446916 100644 --- a/src/ImmutableX.ts +++ b/src/ImmutableX.ts @@ -469,31 +469,6 @@ export class ImmutableX { }); } - /** - * Get Projects owned by the given User - * @param ethSigner - the L1 signer - * @param pageSize - the page size of the result - * @param cursor - the cursor - * @param orderBy - the property to sort by - * @param direction - direction to sort (asc/desc) - * @returns a promise that resolves with the requested Projects - * @throws {@link index.IMXError} - */ - public async getProjects( - ethSigner: EthSigner, - pageSize?: number, - cursor?: string, - orderBy?: string, - direction?: string, - ) { - return this.workflows - .getProjects(ethSigner, pageSize, cursor, orderBy, direction) - .then(res => res.data) - .catch(err => { - throw formatError(err); - }); - } - /** * Get the token Balances of the User * @param request - the request object containing the parameters to be provided in the API request diff --git a/src/workflows/workflows.ts b/src/workflows/workflows.ts index bc20af6a..3e9713c0 100644 --- a/src/workflows/workflows.ts +++ b/src/workflows/workflows.ts @@ -372,25 +372,6 @@ export class Workflows { }); } - public async getProjects( - ethSigner: EthSigner, - pageSize?: number, - cursor?: string, - orderBy?: string, - direction?: string, - ) { - const imxAuthHeaders = await generateIMXAuthorisationHeaders(ethSigner); - - return this.projectsApi.getProjects({ - iMXSignature: imxAuthHeaders.signature, - iMXTimestamp: imxAuthHeaders.timestamp, - pageSize, - cursor, - orderBy, - direction, - }); - } - public async createCollection( ethSigner: EthSigner, createCollectionRequest: CreateCollectionRequest,